Example #1
0
uint64_t
get_frees()
{
#ifdef USE_JEMALLOC
    MemoryManager *mm = MemoryManager::TheMemoryManager();
    return mm->getDeallocated();
#endif
#ifdef USE_TCMALLOC
    if (MallocExtensionInstance) {
        size_t stat;
        MallocExtensionInstance()->GetNumericProperty(
            "generic.thread_bytes_freed", &stat);
        return stat;
    }
#endif
    return 0;
}