nanogui: Thread: nano-X is running out of memory when loading Jpeg-Image in a Fl_Box


[<<] [<] Page 1 of 1 [>] [>>]
Subject: nano-X is running out of memory when loading Jpeg-Image in a Fl_Box
From: "Michael Heiser" ####@####.####
Date: 7 Dec 2009 13:30:59 -0000
Message-Id: <4b1d0391.0d0db80a.3cf1.ffffabb4@mx.google.com>

 

Hey guys,

 

currently I am developing a program which has to load images on demand to an
Fl_Box widget. I use fltk 1.1.8 for my app. The system I use is on an
embedded Device driven by a Blackfin BF537 and uClinux. I use nano-X 0.92
with nxlib 0.45 as windowing system to show the application on an 7" TFT. I
have an amount of 32 Megs Ram and the system and other really important
programs running on system need about 23 Megs.

When I start my App and nano-X 4.2 to 4.5 Megs of Ram are away. So I have
about 4 Megs to load a JPEG image.  When I start loading the Picture the
constructor-call does its job (Fl_JPEG_Image *jpg = new
Fl_Jpeg_Image(filename)),this needs about 700K of RAM, also I can call a
reference of jpg to my picturebox  (/*Fl_Box*/ picturebox->image(jpg)). When
I do a redraw of picturebox (picturebox->redraw()) I see in console that
"XCreatePixmap 640x480 pixel with 16bit depth" is called by nano-X and then
the app is going to crash because nano-X is running out of Ram.

My intention is that nano-X is doing anywhere twice a malloc to reserve
memory for the picture. I don't know where. Is there any advice that you can
give to me?

 

Thanks a lot

 

Michael!!  

[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.