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

Tyson Dowd trd at stimpy.cs.mu.oz.au
Mon May 11 17:02:30 AEST 1998


On 11-May-1998, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > 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.

Sorry, the || should be a &&.  Thanks.

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

I haven't tested it everywhere, so there might be some breakage.
I think it will be fine, but you just never know.  I'll be around
to fix it -- should be easy to back out if there is a problem.

-- 
       Tyson Dowd           # So I asked Sarah: what's the serial number on
                            # your computer? She replied:
     trd at cs.mu.oz.au        #          A-C-2-4-0-V-/-5-0-H-Z
http://www.cs.mu.oz.au/~trd #



More information about the developers mailing list