in reply to backticks and 'Cannot allocate memory'
It fails because under the hood, the backtick operator calls fork and the OS following a conservative approach, aborts the operation because it doesn't have enough memory to hold two process images that big.
The simplest workaround is to allow the kernel to do memory overcommit.
Or alternatively, you could increase the swap space on the machine.
Update:
For perl porters reading this: wouldn't it be possible to use vfork() where supported by the OS to implement qx, system or open(... | ...), etc.?
At some point in the past any decent OS got COW making vfork mostly useless, but now, machines without or with very tiny swap spaces are becoming common making vfork pertinent again!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: backticks and 'Cannot allocate memory'
by JavaFan (Canon) on Sep 24, 2010 at 09:53 UTC | |
|
Re^2: backticks and 'Cannot allocate memory'
by poetnerd (Initiate) on Dec 09, 2016 at 18:58 UTC |