[m-dev.] for review: mercury_memory_* cleanup.

Fergus Henderson fjh at cs.mu.OZ.AU
Mon May 11 15:49:38 AEST 1998


> Clean up memory management code.  This mostly involves cleaning up
> the #defines and removing duplicate code.  This is just an incremental
> improvement, more changes are expected.

...

> +/*
> +** Memory protection and signal handling.
> +*/
> +
> +#if defined(HAVE_SIGINFO) || defined(PC_ACCESS)
> +  #define MR_CAN_GET_PC_AT_SIGNAL
> +#endif

That is incorrect.  HAVE_SIGINFO implies that we
can get the *fault address* at signals; it doesn't
imply that we can get the program counter at signals.

>  bool 
>  default_handler(Word *fault_addr, MemoryZone *zone, void *context)
>  {
> +#ifndef MR_MR_CHECK_OVERFLOW_VIA_MPROTECT
> +	return FALSE;

s/MR_MR/MR/

Otherwise that change looks fine.

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