|
From: Christoph B. <bar...@or...> - 2012-06-06 13:44:18
|
Am 06.06.2012 15:12, schrieb Bart Van Assche:
>> It is just a thin wrapper around glibc malloc.
>>
>> at 0x4C2CD6F: malloc (vg_replace_malloc.c:267)
>> by 0x1D78D377: st_opt_l1_wrap (st_opt_wrap.c:46)
>>
>>
>> indicates that Valgrind sees the malloc call.
>
>
> Please tell us what that wrapper does. Does it e.g. do any caching of
> recently freed blocks ?
No. It does nothing. I explicitly disabled all advanced memory managers
for the valgrind runs. The active one is now the DefaultMem that calls
malloc directly:
inline void *DefaultMem::alloc(std::size_t size)
{
if( size )
{
void *p = malloc(size);
if( ! p ) BN_XCP_MALLOC(size);
return p;
}
return NULL;
}
inline void DefaultMem::free(void *p, std::size_t size)
{
if( size ) ::free(p);
}
|