Re: Heaps and Foreigners
From: Duane Rettig (duane_at_franz.com)
Date: 05/05/04
- Next message: Wade Humeniuk: "Re: Is anything easier to do in java than in lisp?"
- Previous message: Kenny Tilton: "Re: Is anything easier to do in java than in lisp?"
- In reply to: Thomas F. Burdick: "Re: Heaps and Foreigners"
- Next in thread: Tim Bradshaw: "Re: Heaps and Foreigners"
- Reply: Tim Bradshaw: "Re: Heaps and Foreigners"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 05 May 2004 11:03:23 -0700
tfb@famine.OCF.Berkeley.EDU (Thomas F. Burdick) writes:
> Tim Bradshaw <tfb@cley.com> writes:
>
> > Of course, applications that cause the machine to run traumatically
> > out of physical backing for memory have problems, and OSs often handle
> > this case badly. But saying that these facilities therefore shouldn't
> > exist is like saying that you should manage memory yourself because
> > GCs have bad edge cases.
>
> But that's not quite what Duane proposed. When I started reading his
> post, I was gonna jump in with an objection, but by the time I got to
> the end of it, I was quite happy with what he was proposing. That
> database could just as well be mapping a gigantic sparse file, but
> only asking for backing on the parts it's using. This would have the
> advantage that anything it thinks it has access to, it actually does,
> and it could sanely recover from out-of-memory conditions, because the
> memory it thinks it has set aside for this purpose is really set aside.
Precisely. I don't think that it's explicit memory management to
demand that every allocation be explicit, even if through a hook.
It would be nice if along with the MAP_NORESERVE flag provided by
solaris, its mmap() also marked the unbacked addresses as no-access,
and also provided a hook function that would be called whenever
those addresses were accessed - a user trap handler, of sorts.
Then, precise knowledge of what kinds of accesses the program wants
to allow could be provided, and error messages could be explicit
if such accesses are not allowed. The default might be to generate
a SEGV, as usual.
-- Duane Rettig duane@franz.com Franz Inc. http://www.franz.com/ 555 12th St., Suite 1450 http://www.555citycenter.com/ Oakland, Ca. 94607 Phone: (510) 452-2000; Fax: (510) 452-0182
- Next message: Wade Humeniuk: "Re: Is anything easier to do in java than in lisp?"
- Previous message: Kenny Tilton: "Re: Is anything easier to do in java than in lisp?"
- In reply to: Thomas F. Burdick: "Re: Heaps and Foreigners"
- Next in thread: Tim Bradshaw: "Re: Heaps and Foreigners"
- Reply: Tim Bradshaw: "Re: Heaps and Foreigners"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|