Message-ID: <3EA53744.383B819C@yahoo.com> Date: Tue, 22 Apr 2003 08:36:20 -0400 From: CBFalconer Organization: Ched Research X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: djgpp-workers AT delorie DOT com Subject: Re: nmalloc revisited References: <10304211942 DOT AA12379 AT clio DOT rice DOT edu> <3277-Tue22Apr2003105749+0300-eliz AT elta DOT co DOT il> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Eli Zaretskii wrote: > From: sandmann AT clio DOT rice DOT edu (Charles Sandmann) > > > > > What about my new method of installing hooks? > > > > I will defer to Eli and other developers on that call. > > As I said before, I don't mind. However, in the interests of bringing > more people into this decision-making process, could you please post a > short tutorial about what you suggest, i.e. a few examples of how > hooks will be installed and uninstalled? > > Yes, I know it's probably buried somewhere in your zip file, but I, > for one, don't have time to glean this information from there, and > others might not have it as well. Posting that information in a > concise form will allow more developers to make up their minds and > perhaps even suggest improvements. It's on my to-do list. In general, though, DJGPP is not Unix and can never be Unix. In particular it doesn't have the memory protections that Unix does, so I think extra care in providing sensitive interfaces is needed. A unix hook would trap if set to point to non-executable memory. Imagine someone writing: gets((char *)&somehookptr); or something equally bizaare. BTW, the hook documentation says they are specific to DJGPP. My proposal is not compliant with POSIX in the extra argument and macros to malloc_debug only, all other variations are in things marked as !posix and possibly "available on many unices". Maybe, for compatibility, the malloc_debug should be as previously documented, and I should add a function "FILE *setmalloc_debug_dump(FILE *fp)". My gut tells me this is going to be invaluable for holding before and after snapshots, etc. For now the malloc_debug levels are going to remain as originally documented. -- Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT worldnet DOT att DOT net) Available for consulting/temporary embedded and systems. USE worldnet address!