Category : allocator

Here topic about jemalloc. I find information that memory allocated by chunks that divided in runs. And arenas curves the chunks. And we use 4*(CPU-count) arenas if CPUs more than one. What is the connection between these statements? I can’t understand how memory organized in jemalloc. What hierarchy are used here? Source: Windows Que..

Read more

From https://en.cppreference.com/w/cpp/memory/shared_ptr/allocate_shared: template< class T, class Alloc, class… Args > shared_ptr<T> allocate_shared( const Alloc& alloc, Args&&… args ); The storage is typically larger than sizeof(T) in order to use one allocation for both the control block of the shared pointer and the T object. … All memory allocation is done using a copy of alloc, ..

Read more