void * __cdecl dhw_vec_new(size_t size)
{
    tm_thread *t = tm_get_thread();
    ++t->suppress_tracing; // need to suppress since new[] calls new
    uint32_t start = PR_IntervalNow();
    void* result = DHW_ORIGINAL(VEC_NEW_, getVecNewHooker())(size);
    uint32_t end = PR_IntervalNow();
    --t->suppress_tracing;
    MallocCallback(result, size, start, end, t);//do we need a different one for new[]?
    return result;
}
void * __cdecl dhw_malloc( size_t size )
{
    tm_thread *t = tm_get_thread();
    ++t->suppress_tracing;
    uint32_t start = PR_IntervalNow();
    void* result = DHW_ORIGINAL(MALLOC_, getMallocHooker())(size);
    uint32_t end = PR_IntervalNow();
    --t->suppress_tracing;
    MallocCallback(result, size, start, end, t);
    return result;    
}
Example #3
0
void * __cdecl dhw_new(size_t size)
{
    tm_thread *t = tm_get_thread();
    ++t->suppress_tracing;
    PRUint32 start = PR_IntervalNow();
    void* result = DHW_ORIGINAL(NEW_, getNewHooker())(size);
    PRUint32 end = PR_IntervalNow();
    --t->suppress_tracing;
    MallocCallback(result, size, start, end, t);//do we need a different one for new?
    return result;
}