Quote:
Originally Posted by sd136742
xrealloc: cannot reallocate 1073741952 bytes (0 bytes allocated)
At the time the process crashes, the ps output shows a Resident Set Size of 1574060kb, and a VSIZE of 2101664.
|
Notice it is a
reallocate. So there isn't a large enough contiguous chunk of free virtual address space. There may be smaller chunks of free virtual address space adding up to nearly a GB.
The VSIZE is 2GB. A 32 bit Linux kernel can be configured to limit processes to 2GB virtual, but I don't think your kernel is configured that way. I think you could use 3GB virtual.
Quote:
On the 64-bit machine, the same error is displayed...
xrealloc: cannot reallocate 18446744071562068096 bytes (0 bytes allocated)
|
Looks like a bug in the code reporting the error. It might not have actually tried to reallocate that much. It might have tried and failed a reasonable amount and reported it wrong.
But maybe it is a bug in the code that actually tried to do the reallocate.
Either way, it appears someone wrote some code for 32 bit and someone recompiled it for 64 bit without testing for places in the code that assumed 32 bit.
Quote:
Therefore, the 32-bit machine can only address 1.5Gb per process of Physical RAM before the process exits.
|
The limit is on virtual address space, not physical size. Then the physical size is smaller than the virtual address space because of a number of ordinary effects.
So:
1) You have a limit of 3GB of virtual address space.
2) That filled up with just 2GB of virtual memory because the program asked for more in too large a virtual chunk.
3) That occupied only 1.5GB of actual memory for various reasons.
Quote:
The 64-bit machine can only address 3Gb of physical RAM per process.
|
The limit (or bug) must be in the program you were running (I assume that was bash). Under the conditions you described, the kernel would not limit a process anywhere near that low.