On Wed, Apr 10, 2002 at 12:28:33PM -0400, Dan Sugalski wrote:
> At 4:54 AM -0400 4/9/02, Michel J Lambert wrote:

> Right. A good spot for it is in either explicit DOD request ops, or 
> we require it as one of the ops run at block exit or something. We 
> may do a sweep when an exception's triggered as well.
> 
> >Finding 'proper'
> >places to insert this could be hard to do for the compiler writer, imo.
> 
> Nah, I don't think so. There are plenty of reasonable places, and 
> odds are it won't affect many structures anyway, so if we defer it a 
> lot there's no harm nor foul there.

This is part of the use less 'memory' pragma, isn't it?

Presumably one way to trigger it is to have DOD set a flag if it runs and
had to request system memory (or some other quantifiable form of "didn't
manage to reclaim that much memory"). The flag gets read between ops,
(or possibly just at the "reasonable" places you state above) and if it's
set triggers a flag clearing sweep. (No need for DOD - the swept collected
things are got at the next DOD. Unless, of course, use much less => 'memory';
is in force)

> Also, the functions that set it should probably reset it when they're 
> done, though I could argue against requiring that one for speed 
> purposes. I think I'd want benchmarks for it, though.

use more 'speed';

Presumably this sort of speed/memory tradeoff is something that we could
provide the punter with hooks to control?

Nicholas Clark
-- 
Even better than the real thing:        http://nms-cgi.sourceforge.net/

Reply via email to