Mail Archives: djgpp/1992/06/05/15:42:48
> I can certainly see how malloc() could not easily detect that the
> swap disk is full but it should be able to easily see if there is not
> enough virtual memory to satisfy the request.
Swap space IS your virtual memory. In order to detect that malloc()
should return NULL, you have to figure out how much swap space you
would need if you suddenly referenced ALL the memory in the program,
and see if the disk currently has enough space to handle that request.
It's not a trivial piece of code to keep track or and/or compute that
information.
If it's that much of an issue for you, MAKE THE CHANGES YOURSELF!
That's why I send out source code - if you don't like it, change it.
DJ
dj AT ctron DOT com
Life is a banana.
- Raw text -