[m-dev.] Reorganization of mercury_memory.c
fjh at cs.mu.OZ.AU
Mon Apr 27 20:54:27 AEST 1998
On 27-Apr-1998, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> I need to modify mercury_memory.c to implement accurate GC, but it's a
> bit of a mess (so much conditional compilation) so I'm going to
> reorganize it into:
> The MemoryZone data type and functions
> The signal handlers for seg faults, and redzones.
> The leftovers.
That looks OK, I guess.
What's in the leftovers?
I suppose that would be the one that knows about the particular
zones needed by the Mercury runtime, with the others all being
> I also plan to re-organize the conditional compilation (presently, it's
> almost impossible to change anything without a printout), and make the
> tests more feature based.
This principle is something I would very strongly encourage.
> For example, have
> rather than HAVE_MPROTECT && (HAVE_SIGINFO || PC_ACCESS).
In this particular case, I think the example you chose is
perhaps misnamed: something named CAN_GET_PC_AT_SIGNAL
should not depend on HAVE_MPROTECT, should it?
Perhaps you want CAN_GET_PC_AT_SIGNAL to be true iff
HAVE_SIGINFO || PC_ACCESS, with say CHECK_OVERFLOW_VIA_MPROTECT
defined to be true iff HAVE_MPROTECT and CAN_GET_PC_AT_SIGNAL
are both defined.
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 18.104.22.168 | -- the last words of T. S. Garp.
More information about the developers