[m-dev.] An algorithm for heap-reclamation on failure

Fergus Henderson fjh at cs.mu.oz.au
Fri Feb 7 08:58:56 AEDT 1997


Thomas Charles CONWAY, you wrote:
> 
> Here is a new algorithm for allowing the reclamaition of heap on failure
> (which we currently do in non-gc grades) for the case where multiple
> threads of execution may use a single heap. Your comments would be welcome,
> especially if you find a bug in it.

I think it looks good.

> code for reclaiming heap on backtracking:
> 	...
> 	/* oldval is the value of hp that was stored in the choice-point */
> 	hp = (oldval > min ? oldval : min);
> 	....

That should be encapsulated in the `restore_hp' macro, of course.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list