[strongSwan-dev] malloc check policy

Emeric POUPON emeric.poupon at stormshield.eu
Tue Mar 22 09:55:50 CET 2016


Hi,

>> The question is: since you have done the job to get proper malloc hooks with the
>> leak detective, why not just abort on failure?
> 
> I hope you are not enabling leak detective on your production systems.
> It's quite a hack and has a huge performance impact due to the single lock.
> 

Actually, the leak detective would set the mallocs hooks even if it is unused.
Every real_malloc call would be checked and an abort would be produced on error.
No lock would be involved here, and it has the benefit to catch all the allocations failures for each platform.

Well, "leak_detective" may not be an appropriate name for this new behavior.

What do you think?




More information about the Dev mailing list