hi,
I’m testing Photon 1.13 in stress conditions (under QNX 4.25). Here’s
what I do :
- Start Photon and graphic driver (Pg.xxx) during boot (pwm, pdm… do
not run) - Launch a program that:
- creates a PtWindow with a PtRaw inside, and PtRealize() it,
- hogs all available RAM by calling malloc() many times, until it
fails, - call various PgXXX functions to draw inside the window.
When testing PgDrawBitmap(), I get this message on the console:
“Photon: malloc failed attempting to allocated 3704 bytes”
This message appears several times (24).
BUT strangely, what I can see on screen seems to be normal !!!
My bitmap is 128x228 pixels large, one plane.
It seems that using smaller bitmaps (e.g 25x35) don’t give this message.
So:
- why these mallocs ? (for interest only)
- why does my program seems to work correctly in spite of these failed
mallocs ? - in which case does Photon needs to malloc() ? Does it depends on the
bitmap size ? - can I tell Photon to avoid malloc’ing ?
Gilles Barges,
software engineer, Technicatome
gbarges@tecatom.fr