-- Judith Reed jreed_at_appliedtheory.com ========================================================================== Insufficient page/swap space is one of the reasons that malloc (and company) will return NULL and set the errno value to ENOMEM. Running into the process data size limit will also do it. Think 1 GB happens to be the default system maximum for the data size limit (128 MB being the process default limit). There may be other system virtual memory parameters that will limit the size. ========================================================================== Eager swap must preallocate (on disk) all of the virtual space that it needs for every syscall (printf, etc). : >From the man page on swapon: There are two strategies for swap space allocation: immediate mode and deferred or over-commitment mode. The two strategies differ in the point in time at which swap space is allocated. If immediate mode is used, swap space is allocated when modifiable virtual address space is created. If deferred mode is used, swap space is not allocated until the system needs to write a modified virtual page to swap space. Immediate mode is the default swap space allocation strategy. ========================================================================== [my query] > We have a server that is a dedicated search engine. Of late, the primary > process on it has taken to dying when its virtual size reaches 1024MB, which > is the size of physical memory. It makes a core file, and I've been told the > error in the core file says it is dying on a: > > "check for null return from malloc - essentially the system saying it won't > give the process any more memory" > > according to the lead programmer. The odd thing about this system is > that it has 767MB of swap, with that 1GB memory (don't ask me why, unknown). > > It is running eager swap, and the system is DU40d on a 4100. > > Does it seem likely that malloc would fail once the process's virtual size > reaches memory size, given that there is insufficient swap to swap the whole > process out, were that necessary?Received on Thu Nov 19 1998 - 21:13:06 NZDT
This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:38 NZDT