Re: Cannot activate sbcl
- From: "Dimiter \"malkia\" Stanev" <malkia@xxxxxxxxx>
- Date: Fri, 09 Nov 2007 12:01:40 -0800
Hi George,
You must be running a 64-bit version of Windows - 32-bit versions are
limited to 4GB page files.
Somehow I've managed to use 16GB and I'm using the 32bit version of Windows XP (Latest service pack, updates, etc), and I was able to use all that memory (e.g. I was able to run 9 copies of the "a.exe" with 1.85GB of memory in each = 16.65GB). My machine has 4GB itself + 16GB virtual memory additional.
Here are my VM settings:
http://img220.imageshack.us/my.php?image=vmyo2.png
Either way you can't allocate any more
than the VMM model allows. Even though the 32-bit x86 can address 64TB
using segments, 32-bit Windows uses only 2 segment selectors (kernel
and user) and 4GB of addresses.
But each application has it's own virtual space (2GB local, 2GB global), or you can set-up your windows, and recompile your executables for 3GB local, 1GB global.
But if you are running 64-bit, then I'm very interested in why you had
to use a hack to allocate a 2GB array. Do you have a resource limit
set? Or is it just some old code from 32-bit land?
Well I'm not :) But I wish to (Dreaming that one day everybody would switch to OS X at the workplace, still not so worse as dreaming everybody would switch to Common Lisp).
I've also browsed a bit the SBCL source code, and I don't think my hack would help there, unless some other heavy hacking is done. Somehow my hack can give you contigous memory (if you set VM pagefile to be big enough), but later you can't reuse that memory for VirtualAlloc() - e.g. you can't give it back to VM for other stuff. Which might mean that you can't map it for code execution - pretty useless for a lisp system :) Or can you?
Yes you can give it back (see VirtualFree), but it's dangerous because
C still thinks it is a valid array, but you'll get a protection fault
if you touch any part of it that has been released to the VMM.
Ah, that's an interresting idea, but I was not able to get it working. Might work, as long as this whole array is in a separate "segment" (not sure about the correct term). This little application might show, what I mean by that (I've actually tried something like that:
#include <stdio.h>
#include <windows.h>
int stump1;
char huge[1024*1024*1800];
int stump2;
int main()
{
unsigned i =0;
printf( "BaseAddr,AllocBas,AllocPro,Reg.Size, State, Protect, Type\n" );
huge[1024*1024*1024] = 100;
huge[1024*1024*1500] = 100;
memset( huge, 0, 1024*1024 );
for( ;; )
{
MEMORY_BASIC_INFORMATION mbi;
memset(&mbi, 0, sizeof(mbi));
VirtualQuery( i, &mbi, sizeof(mbi));
printf( "%p,%p,%p,%p,%p,%p,%p\n",
mbi.BaseAddress,
mbi.AllocationBase,
mbi.AllocationProtect,
mbi.RegionSize,
mbi.State,
mbi.Protect,
mbi.Type
);
if( i + mbi.RegionSize <= i )
break;
i += mbi.RegionSize;
}
for( ;; ) {};
}
Cheers!
.
- Follow-Ups:
- Re: Cannot activate sbcl
- From: George Neuner
- Re: Cannot activate sbcl
- References:
- Cannot activate sbcl
- From: iu2
- Re: Cannot activate sbcl
- From: Dimiter \"malkia\" Stanev
- Re: Cannot activate sbcl
- From: George Neuner
- Re: Cannot activate sbcl
- From: Dimiter \"malkia\" Stanev
- Re: Cannot activate sbcl
- From: George Neuner
- Re: Cannot activate sbcl
- From: Dimiter \"malkia\" Stanev
- Re: Cannot activate sbcl
- From: George Neuner
- Cannot activate sbcl
- Prev by Date: Re: Newbie question, store some in a variable
- Next by Date: Re: Newbie question, store some in a variable
- Previous by thread: Re: Cannot activate sbcl
- Next by thread: Re: Cannot activate sbcl
- Index(es):
Relevant Pages
|
Loading