Resource usage of memory leak and crash out on overrun

delphi package - automated exception handling
Post Reply
rossmcm
Posts: 74
Joined: Thu Jun 09, 2005 2:05 am
Contact:

Resource usage of memory leak and crash out on overrun

Post by rossmcm »

In this topic mention is made of the memory usage of the memory leak detection and instant crash on buffer overflow functions of MadExcept.

How much memory is used by these functions? Say I have a TList of 1 million pointers, where each pointer points to a memory block of 10 bytes allocated with New. What will the extra memory used by MadExcept be?

If I subsequently free the blocks and reallocate them, does MadExcept also recover what it used, i.e. are there any cumulative side effects through using the leak detection? (I guess what I'm asking is "is there a memory leak in the memory leak detection". Pretty stupid really...).

As far as the Instantly crash.. options go, is the overhead introduced in the code or data or both, and does it grow as the code concerned executes?

Thanks,
R
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: Resource usage of memory leak and crash out on overrun

Post by madshi »

I've already replied to your questions in the linked thread.
rossmcm
Posts: 74
Joined: Thu Jun 09, 2005 2:05 am
Contact:

Re: Resource usage of memory leak and crash out on overrun

Post by rossmcm »

Thanks Mathias. (for reference, the answer from Mathias follows:)
Each Delphi memory manager allocation, regardless of which API is used. A page is 4096 bytes, IIRC. If you release an allocated object, you get the memory back, of course. And please note that this allocation behaviour only applies when using "instantly crash", it does *NOT* apply only when using leak reporting.
Post Reply