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

@@ -108,7 +108,7 @@ int ocf_cache_line_concurrency_init(struct ocf_cache_line_concurrency **self,
goto allocation_err;
}
c->allocator = env_allocator_create(sizeof(struct __waiter), name);
c->allocator = env_allocator_create(sizeof(struct __waiter), name, false);
if (!c->allocator) {
error = __LINE__;
goto allocation_err;

View File

@@ -492,7 +492,8 @@ int ocf_metadata_io_ctx_init(struct ocf_ctx *ocf_ctx)
sizeof(struct metadata_io_request),
ENV_MEM_NOIO, ocf_mio_size_max - 1, true,
limits,
"ocf_mio");
"ocf_mio",
true);
if (ocf_ctx->resources.mio == NULL)
return -1;

View File

@@ -34,7 +34,8 @@
static int ocf_io_allocator_default_init(ocf_io_allocator_t allocator,
uint32_t priv_size, const char *name)
{
allocator->priv = env_allocator_create(OCF_IO_TOTAL(priv_size), name);
allocator->priv = env_allocator_create(OCF_IO_TOTAL(priv_size), name,
true);
if (!allocator->priv)
return -OCF_ERR_NO_MEM;

View File

@@ -47,7 +47,7 @@ int ocf_req_allocator_init(struct ocf_ctx *ocf_ctx)
{
ocf_ctx->resources.req = env_mpool_create(sizeof(struct ocf_request),
sizeof(struct ocf_map_info), ENV_MEM_NORMAL, ocf_req_size_128,
false, NULL, "ocf_req");
false, NULL, "ocf_req", true);
if (ocf_ctx->resources.req == NULL)
return -1;