Hi Sorin.
I wasn't aware of it, but you are right.
This is normally not observed, since the amounts are relatively small
(e.g. compared to a surface buffer),
and because most of the allocation is at startup when memory is still
a-plenty.
In principle the D_MAGIC_SET etc. should be made independent of the
D_CALLOC() result, and then the 'p' checked outside of the macro,
or alternatively a "return" statement like in DIRECT_INTERFACE_GET_DATA,
given this is compatible with all instances.
Either way, it will be a large changeset.
Open for suggestion/patches :)
Greets
Niels
Sorin Otescu wrote:
Hi,
While using df_stress we noticed that DIRECTF_ALLOCATE_INTERFACE
doesn't check its internal memory allocation (D_CALLOC), causing a
segfault if there's no more system memory. Is this known or expected?
Sorin
_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
--
.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/ |
"------------------------------------------"
_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev