Out of memory conditions and g_malloc



Hi,
   The documentation at
http://www.gtk.org/tutorial/sec-memorymanagement.html
has:

"gpointer g_malloc( gulong size );

This is a replacement for malloc(). You do not need to check the return value as it is done for you in this function. If the memory allocation fails for whatever reasons, your applications will be terminated.
"

Is there a way to specify a handler for when memory allocation fails, so that we may have the opportunity to get something more graceful than a terminated application?


Thanks,
--
Philippe Laporte
Senior Design Engineer
Nokia Mobile Phones, Open Source Software Operations
Street address: Itämerenkatu 11-13, 00180 Helsinki, Finland
Post address:   P.O. Box 407, FIN-00045 NOKIA GROUP
Phone:          +358 50 482 1979
Fax:            +358 7180 36229
E-mail:         philippe laporte nokia com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]