Posted May 17, 2007 14:18 UTC (Thu) by dark
In reply to: Critical Vulnerabilities in Samba
Parent article: Critical Vulnerabilities in Samba
One technique of dealing with that is to allocate an emergency reserve of
memory when the program starts up. Then if you run out of memory, start a
graceful shutdown process while allocating from that emergency reserve.
The main difficulty is that library functions won't know about your
reserve. If you're on intimate terms with your malloc implementation, you
can get around that by actually freeing the emergency reserve, and relying
on malloc to keep the memory around and allocate from that space.
Of course, it wouldn't be a good idea for every program to do this. Then
you'd run out of memory. ;)
to post comments)