Date: Fri, 5 Jun 92 14:53:12 EDT From: DJ Delorie To: mimperat AT cs DOT dal DOT ca Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: malloc() doesn't return a null pointer when out of memory > 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.