I was going to let this thread die... but:
>
> This is absolute nonsense. If you want this behavior, link you
> programs with a malloc/free implementation that does this. To have every
> program run with this behavior would require the virtual memory page size
> to be the size of a machine word! The way the malloc debuggers do it is
> by allocating extra memory, and lots of it. Electric Fence allocates at a
> minimum two entire pages for each allocation. So for even a int, you
> allocate two pages. This is crazy for anything but debugging an
> application.
What is happening is that, with thoughts of improving performance, free is
not casting off the page into the great void of virtual address spaces
that map to nothing. Free is keeping the page valid with the hopes that
you'll ask for another one soon.
A memory location in a program's address space can be thought of as having
two states: allocated, and free. I do not claim that you should never be
able to access an address again, just never be able to access it when
it's in the "free" state. This is clearly not garbage collection. In fact,
it's the opposite. I think the memory should be free'd when I call free().
With garbage collection, there is no concept of "free".
The VM can still do this without a performance hit by doing things like
seting the one of the status bits (like invalid, readonly, dirty or
combination thereof) and coding the exception handler to catch the illegal
dereference, just as it would for a virtual address for a page that have
not been created yet. So, the claim that this improves performance doesn't
seem to be valid.
namaste,
Mark
---------------------------------------------------------------------------
Send administrative requests to [EMAIL PROTECTED]