freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Devel] Debugging Memory Manager added to FreeType sources


From: Tom Kacvinsky
Subject: Re: [Devel] Debugging Memory Manager added to FreeType sources
Date: Mon, 22 Oct 2001 10:15:43 -0400 (EDT)

Hi David,

To test this code out, I recompiled the library, but without the patches for the
Type 1 driver that I recently submitted.  I expected ftlint to give some error
messages along the lines of what ftmemchk reports, but no go.

Any ideas?

Tom

On Mon, 22 Oct 2001, David Turner wrote:

> Hello,
>
>   I have just added a new source file, named "src/base/ftdbgmem.c", that
>   implements a simple debugging memory manager for FreeType. It is activated
>   by defining FT_DEBUG_MEMORY in "ftoption.h"
>
>   It will report simple errors like invalid reallocation requests, double
>   deletes, as well as memory leaks (when FT_Done_FreeType is called).
>
>   Note that it's basically the same thing that was previously in the
>   "ftmemchk.c" demo program, except that:
>
>    - the blocks are recorded with a hash table, which provides much
>      better performance than a linear list :o)
>
>    - all FreeType applications can easily benefit from it, so it can
>      be used to debug leaks and bugs that appear in "rare" situations,
>      not only in a single demo program..
>
>    - finally, using it requires much more memory than a typical build,
>      since it never really "free" the blocks allocated from the heap
>      (in order to detect double deletes easily..)
>
>   I'll probably make a few modifications in the future, like using an
>   environment variable to determine at run-time wether to use the debugging
>   manager or not..
>
>
> Cheers,
>
> - David
>
> PS: And of course, this thing will go into the MLib as well..
>
> _______________________________________________
> Devel mailing list
> address@hidden
> http://www.freetype.org/mailman/listinfo/devel
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]