Re: Lisp Garbage Collection
- From: "Joe Marshall" <eval.apply@xxxxxxxxx>
- Date: 5 Sep 2006 09:45:29 -0700
George Neuner wrote:
On 31 Aug 2006 07:46:09 -0700, "llothar" <llothar@xxxxxx> wrote:
skibud2 wrote:
I was talking with a fellow engineer at work about why CMUCL and SBCL
have not been fully ported to Windows. He mentioned that it is
difficult to port most Lisp implementations because of difference
between the Linux and Windows memory models and how they are used for
garbage collection. Can someone shed some light on what these
differences are.
When i have the todo list right in mind the largest problem is that
under Win32 you can't allocate a fixed address range and so loaded
compiled code must be able relocateable. The current implementation of
the SBCL compiler is not.
??? The first argument to VirtualAlloc() is the desired starting
address for the memory block. It will be rounded to the nearest page
boundary but that shouldn't be any problem.
VirtualAlloc is allowed to return null if it cannot reserve the desired
pages.
In any case, the lisp heap isn't allocated dynamically like that. It
resides in a file, so you would use the file mapping functions. If you
look at `MapViewOfFileEx', you'll see this caveat:
``While it is possible to specify an address that is safe now (not
used by the operating system), there is no guarantee that the address
will remain safe over time. Therefore, it is better to let the
operating system choose the address. In this case, you would not store
pointers in the memory mapped file, you would store offsets from the
base of the file mapping so that the mapping can be used at any
address.''
There are obviously many solutions to this problem. Making the SBCL
compiler emit position independent code is a good start.
I don't know enough Lisp to be useful to the project, but if what you
say about their problems is true, somebody there should definitely
read up on Window's memory management API - it's orders of magnitude
more flexible than the Unix API. Memory management is one thing
Window's does *far* better than Unix.
Agreed. Windows also excels in process control.
.
- Follow-Ups:
- Re: Lisp Garbage Collection
- From: George Neuner
- Re: Lisp Garbage Collection
- References:
- Re: Lisp Garbage Collection
- From: George Neuner
- Re: Lisp Garbage Collection
- Prev by Date: Re: adjust-array vs. :adjustable t
- Next by Date: Re: Too Much Caffeine -- Users v. Surface v. Deep Programming
- Previous by thread: Re: Lisp Garbage Collection
- Next by thread: Re: Lisp Garbage Collection
- Index(es):
Relevant Pages
|