MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / allocate

Method allocate

3rd/mimalloc-2.0.9/include/mimalloc.h:465–465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

463
464 #if (__cplusplus >= 201703L) // C++17
465 mi_decl_nodiscard T* allocate(size_type count) { return static_cast<T*>(mi_new_n(count, sizeof(T))); }
466 mi_decl_nodiscard T* allocate(size_type count, const void*) { return allocate(count); }
467 #else
468 mi_decl_nodiscard pointer allocate(size_type count, const void* = 0) { return static_cast<pointer>(mi_new_n(count, sizeof(value_type))); }

Callers

nothing calls this directly

Calls 2

mi_new_nFunction · 0.85
allocateFunction · 0.50

Tested by

no test coverage detected