Use new non-zeroing allocator APIs

Signed-off-by: Jan Musial <jan.musial@intel.com>
This commit is contained in:
Jan Musial
2021-06-09 09:48:17 +02:00
parent 68fccaf9ae
commit f25d9a8e40
8 changed files with 33 additions and 31 deletions

View File

@@ -29,7 +29,8 @@ struct env_mpool {
struct env_mpool *env_mpool_create(uint32_t hdr_size, uint32_t elem_size,
int flags, int mpool_max, bool fallback,
const uint32_t limits[env_mpool_max],
const char *name_perfix)
const char *name_perfix,
bool zero)
{
uint32_t i;
char name[MPOOL_ALLOCATOR_NAME_MAX] = { '\0' };
@@ -56,7 +57,8 @@ struct env_mpool *env_mpool_create(uint32_t hdr_size, uint32_t elem_size,
size = hdr_size + (elem_size * (1 << i));
mpool->allocator[i] = env_allocator_create_extended(
size, name, limits ? limits[i] : -1);
size, name, limits ? limits[i] : -1,
zero);
if (!mpool->allocator[i])
goto err;