3 ms·
Yes, simpler designs for malloc share free pool tracking structures among threads and use locks to protect against creating races. Other malloc implementations
by robmccoll 12y ago
Yes, simpler designs for malloc share free pool tracking structures among threads and use locks to protect against creating races. Other malloc implementations use thread local free pool caching structures to lessen the frequency of synchronization in the allocator in the general case. TC actually stands for 'thread caching'.
Under the hood, the default std allocator being used to power new is typically calling malloc, so simply linking in a different implementation should work.