Release 0.0.3 - mmap failure under Cygwin (Windows 7)
Bug #1173808 reported by
Daniel Ritchie
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ikarus Scheme |
New
|
Undecided
|
Unassigned |
Bug Description
Attempting to build ikarus release 0.0.3 via Cygwin on a 64-bit Windows machine:
../src/ikarus -b ./ikarus.
failed to mmap: Cannot allocate memory
To post a comment you must log in.
I tried to trace this problem. mmap gets a request to map ~4GB of memory. This is not intended and is cause by integer arithmetic in ikarus-runtime.c which runs into an overflow.
This seems to happen if you have more than 4GB memory. The first mmap call gives an address just below the 4GB boundary, and the calculations do overflow.
I attached a patch with a workaround (allocate a block of memory on the first run, such that all further allocations do get smaller addresses). This resolved the problem for me for now, but it needs a proper fix...