in reply to Re^3: Error: Not enough space
in thread Error: Not enough space
Now let me give you what I have found out after doing as you guys suggested. This time I ran the program 4 times and all 4 times fork failed with ENOMEM. But as I say system staus says there is enough RAM + swap available.
Total Memory-RAM : 8G, 1.6G free
Swap : 10G, 2.5G free when the error occurs.
Now parent process takes about 1.6G memory and all child processes also take up same 1.6G memory. Fork failed after 4 child processes were spawned. So logically there is no reason to get an ENOMEM in fork - right? Your thoughs please.
Here's what I have found : If I keep allocating memory from within a process
, after the allocated memory hits 4G for the process it terminates ( sometimes with malloc failure - Out of memory, sometimes with Segmentation fault)perl -le 'while () {$a.="x"x(1<<26);}'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Error: Not enough space
by Joost (Canon) on Jan 05, 2005 at 22:49 UTC | |
by jhazra (Novice) on Jan 05, 2005 at 23:04 UTC |