Adriaan van Os wrote:
CBFalconer wrote:
... snip ...
Of course it did. malloc of that size would require a sbrk with a negative size (even though sbrk is specified to take an unsigned). That would reduce the heap space available, and create havoc.
Yeah, 2147483648 = $80000000 and possibly negative, but the original request in systemtest.pas was just below 2GiB. Probably malloc rounds it up to an integral number of pages.
The threshold in nmalloc is (INT_MAX - 65536) after rounding. Just a little safety margin.