Mail Archives: djgpp-workers/2001/01/08/02:47:03
On Mon, 8 Jan 2001, Mark E. wrote:
> > > + /* Temporarily clear chunk-in-use bit so macros work correctly. */
> > > + b1->size &= ~1;
> >
> > Isn't this a bit dangerous? Doesn't it leave the malloc chain in an
> > inconsistent state, for a small window of opportunities? What if some
> > signal (i.e. exception) strikes between this line and where you restore
> > the bit, and the code run from the signal handler calls memalign?
>
> I hadn't thought of that. Would adding '& ~1' to BEFSZ, ENDSZ, etc. work for
> you?
I think it's better.
- Raw text -