NO

Author Topic: Tmalloc  (Read 8352 times)

JohnF

  • Guest
Tmalloc
« on: June 07, 2005, 04:07:03 PM »
It can be difficult to track down memory leaks when using malloc especially in large projects.

Tmalloc should be used for that purpose.

Generally, call report_heap() just before your app terminates, this will report any allocated memory blocks that were not released, giving the file/module name and line number where the memory was allocated.

TMalloc was originally developed solely to check for memory leaks when using malloc-ed memory. Since then it has expanded to check for buffer over-runs for various string functions.

See tmalloc.h for further comments regarding malloc and family functions.

(I'd just fixed a bug in Tmalloc and thought of contributing it here)

EDIT: found another bug so removed the attachment.

John

tiwag

  • Guest
Re: Tmalloc
« Reply #1 on: June 07, 2005, 05:27:46 PM »
Quote from: "JohnF"
...I'd just fixed a bug in Tmalloc and thought of contributing it here

John


Hello John !

GREAT !
thanks a lot !

JohnF

  • Guest
Re: Tmalloc
« Reply #2 on: June 07, 2005, 05:44:15 PM »
Quote from: "tiwag"
Quote from: "JohnF"
...I'd just fixed a bug in Tmalloc and thought of contributing it here

John


Hello John !

GREAT !
thanks a lot !


Removed it because I found anther bug, will upload it when fixed. Sorry about that!

John

JohnF

  • Guest
Tmalloc
« Reply #3 on: June 07, 2005, 07:09:31 PM »
Ok, I think it's fixed, here is it again.

edit; OOPS, replaced the attachment with a PellesC project.

John