[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-smalltalk] Memory management
From: |
Paolo Bonzini |
Subject: |
[Help-smalltalk] Memory management |
Date: |
Tue, 5 Dec 2000 16:50:35 +0100 (CET) |
I did try not using MAP_FIXED. But the problem is that I cannot map 256
MB at startup, that would be quite wasteful... My usage of MAP_FIXED
(together with the mmap.m4 test) tries to find a place where I can assume
that no mmaps will be done. Anyway the bug happened before I switched to
mmap.
Under Windows I can ask the OS to reserve 256 MB and leave them unmapped
via VirtualAlloc and VirtualFree (see `#ifdef _WIN32' code). An idea
could be to mmap 256 MBs to a dummy file, then when I need memory I unmap
them and map them to /dev/zero. I am told that under Linux mmap-ed files
don't consume swap space; I never wrote code to test this claim and cannot
test other OSes -- if I dare use 256 MBs of memory on the university's
HP-UX workstations, the root won't be happy...
Try writing a small stupid program like
main(argc)
unsigned int argc;
{ return argc*argc; }
and tracing through it with gdb... maybe that helps figuring out if it is
normal that .umul or _PROCEDURE_LINKAGE_TABLE_ end up executing that
address.
|_ _ _ ___
|_)(_)| ) ,'
--------- '-._.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Help-smalltalk] Memory management,
Paolo Bonzini <=