[m-dev.] For review: revised changes to runtime for global heap

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Jun 17 14:17:21 AEST 1998


On 17-Jun-1998, Warwick Harvey <wharvey at cs.monash.edu.au> wrote:
> I'm thinking it might be worth defining MR_heap_zone, etc.:
> 
> #define MR_heap_zone		MR_ENGINE(heap_zone)
> #define MR_solutions_heap_zone	MR_ENGINE(solutions_heap_zone)
> #define MR_global_heap_zone	MR_ENGINE(global_heap_zone)
> 
> Does this seem useful?

Yes.

> If so, where should they be defined?
> mercury_engine.h?

Yes.

> Anyway, the real point of this mail is the revised changes to the runtime 
> for adding the global heap:
...
>  #define MR_NUM_SPECIAL_REG	10

You need to change that to 11 now.

Apart from that, those changes look fine.

However, the existing definition of MR_NUM_SPECIAL_REG is wrong in the
`defined(MR_THREAD_SAFE) && NUM_REAL_REGS > 0' case -- it should
be 11 before your addition of global_hp and 12 after it.
You might as well fix that one while you're at it.
Also please copy the documentation at the top of the non-thread-safe
case saying

	/*
	** If you modify the following block, make sure that you update
	** the definitions of MR_NUM_SPECIAL_REG, MR_MAX_SPECIAL_REG_MR,
	** and MR_saved_*.
	*/

to the corresponding spot in the thread-safe case.

(I'd fix these two myself, but it's probably easier for you to do it
yourself rather than to try to merge in my changes.)

Otherwise, everything looks fine.  Please mail around another diff,
but the changes suggested above are pretty straightforward, so
if it passes the bootcheck then go ahead and commit it without
waiting for another review.

Cheers,
	Fergus.

-- 
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