Mail Archives: djgpp-workers/2002/03/01/10:54:49
> > The whole guardhi block can be removed entirely without affecting
> > anything (except the DATAOFFSET macro). Its sole purpose is to
> > protect against user misuse (one off addressing) clobbering the
> > memory arena. The guardlo has a dual purpose, guarding and
> > alignment. I threw in the initialization to DEADBEEF, BEEFDEAD,
> > F00DFEED etc. just for sport and to make memory dumps obvious.
Understood. It's a good idea for debugging. The concern is memory
overhead in the production version (which will go into *every*
image built, even those well debugged).
> A further question - will raise(SIGSEGV) in the package on
> detectable errors foul up the initialization sequence, since
> malloc etc. appears to be called during it?
If you are going to take the time to detect errors, a message to
stderr() explaining the error in plain terms will be much more
valuable. There are lots of people who would start posting
"there's a bug in malloc" if they see the SIGSEGV. This is
probably a FAQ by the way...
while malloc is called in the setup - it's called after exception
setup - and I certainly hope we don't have bugs in the startup
to trigger it anyway. So I don't think a raise should break
anything.
As far as other comments - I don't currently have the time to do a
detailed crtical review (busy at work and at home). But I think
several people need to do such a review on such a critical piece
of code. If I remember correctly, it took about a year after DJ's
re-write to get enough testing, comments before the current version
was put in use. Be patient, it may take several weeks or months.
Sometimes it's hard to find time to review 10 line changes :-(
- Raw text -