Re: Cannot activate sbcl



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!
.



Relevant Pages

  • Re: 1.45G of memory with status of MEM_RESERVE
    ... Is this on Windows CE or Windows NT/XP? ... If you do mean Windows CE, what are you using to determine the memory state? ... VirtualAlloc. ... There may be other services your app uses that reserves virtual memory ...
    (microsoft.public.windowsce.embedded.vc)
  • RE: How to extend the allowed physical memory?
    ... you want to allocate a block of memory in RAM ... with windowed views to this physical memory from ... RAM, then use VirtualAlloc to reserve in process Virual memory space, then ... "Address Windowing Extensions and Microsoft Windows 2000 Datacenter Server" ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Cannot activate sbcl
    ... because I've set the virtual memory page file to be 16GB of memory, ... You must be running a 64-bit version of Windows - 32-bit versions are ... using segments, 32-bit Windows uses only 2 segment selectors (kernel ... but later you can't reuse that memory for VirtualAlloc() - e.g. ...
    (comp.lang.lisp)
  • Re: Memory access in Windows CE 5
    ... You need to map the physical memory to virtual memory. ... Use the VirtualAlloc and VirtualCopy to accomplish this. ... Accessing the hardware from an app is generally frowned upon. ... I'm trying to write a program that will run on my Windows CE 5 BSP ...
    (microsoft.public.windowsce.platbuilder)
  • RE: Virtual memory
    ... You can configure virtual memory in windows xp and thereby improve the ... How to set performance options in Windows XP ... if you have background programs such as printing or disk ... It is also known as the paging file. ...
    (microsoft.public.windowsxp.perform_maintain)

Loading