inline void MemoryManager::smartFree(void* ptr) { assert(ptr != 0); auto const n = static_cast<MallocNode*>(ptr) - 1; auto const padbytes = n->small.padbytes; if (LIKELY(padbytes <= kMaxSmartSize)) { return smartFreeSize(&n->small, n->small.padbytes); } smartFreeBig(&n->big); }
inline void MemoryManager::smartFree(void* ptr) { assert(ptr != 0); auto const n = static_cast<SweepNode*>(ptr) - 1; auto const padbytes = n->padbytes; if (LIKELY(padbytes <= kMaxSmartSize)) { return smartFreeSize(static_cast<SmallNode*>(ptr) - 1, n->padbytes); } smartFreeBig(n); }