Re: Malloc debugging (Was: Medit crash)

From: George (greerga@CIRCLEMUD.ORG)
Date: 11/30/97

On Fri, 28 Nov 1997, Rasmus Ronlev wrote:

>Anyway, would it be possible and/or a good idea making some sort of
>wrapper for all the 'writes' into memory ? I guess doing that with the
>code I'm currently using would really hog up CPU time *snicker* Not to
>mention making it take a century to boot up the mud. But, I'm desperately
>in need of a good way to find and bugfix such problems like this (also in
>the future).

You could try a method similiar to my buffer system where I allocate an
extra byte and make sure that token is there when I free it.

>In the case of writing a wrapper, what functions would I need to make a
>wrapper for, and where would I find the information on the structures (the
>header size) for the malloc() function, so I can also test for occurances,
>that overwrite those parts of the memory... ?

In my case, just [mc]alloc and free.

George Greer  -   | Genius may have its limitations, but stupidity | is not thus handicapped. -- Elbert Hubbard

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/08/00 PST