Re: Cannot activate sbcl
- From: "Dimiter \"malkia\" Stanev" <malkia@xxxxxxxxx>
- Date: Mon, 05 Nov 2007 14:43:04 -0800
iu2 wrote:
Hi all,
I (am trying to) use sbcl on Windows. On some PC's it runs ok, while
on others I get the message (upon runnin sbcl.exe):
VirtualAlloc: 0x1e7.
ensure_space: failed to validate 536870912 bytes at 0x09000000
(hint: Try "ulimit -a"; maybe you should increase memory limits.)
What does it mean? I get this message on a PC with 1 GB RAM so I
believe memory is not the issue.
I'll appreciate your help
iu2
I've had similar issue in a C program, trying to allocate huge contiguous buffer. What I've ended up doing was kind of hacky, instead of relying on HeapAlloc, VirtualAlloc, etc., I've made a huge array of 1.5GB
char memory[1024*1024*1024 + 512*1024*1024]; /* Unitilized in BSS */
Then I've changed all my memory through ad reused it from there (using Doug Lea's dlmalloc()'s mspace_s API).
Q: Why this worked, and not just using VirtualAlloc?
A: Looks like if windows sees that your BSS or DATA section is enourmous, it would reallocate any DLL's that might be mapped into that are somewhere else (HIGH in the memory space I guess).
Q: Why VirtualAlloc 1.5GB might almost never work?
A: Possibly as once your application is started, you can't move around code (or you can't easily move it, there might be some tricks), so you have to do before the actual application is started - SBCL.EXE
For a crude example take any application, and open it with the Dependancy Walker (depends.exe from http://www.dependencywalker.com/), see how various DLL's (hooks, google-desktop search is there, IME's, etc) are mapped into it. Most likely on other people's machines that would be mapped even more differently.
So I would say, if you always want safe deployment, hack SBCL this way - instead of using VirtualAlloc, make it use a huge unitilized BSS section, and use the data from there. It might be quite hacking, or not much (haven't looked into the source code).
.
- Follow-Ups:
- Re: Cannot activate sbcl
- From: George Neuner
- Re: Cannot activate sbcl
- References:
- Cannot activate sbcl
- From: iu2
- Cannot activate sbcl
- Prev by Date: Re: Why so much Space and GC? How to interpret `(time ...)'?
- Next by Date: Re: slime list
- Previous by thread: Re: Cannot activate sbcl
- Next by thread: Re: Cannot activate sbcl
- Index(es):
Relevant Pages
|