Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions env/posix/ocf_env_default.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,16 @@ static inline void env_free(const void *ptr)
free((void *)ptr);
}

static inline void *env_kvzalloc(size_t size, int flags)
{
return env_zalloc(size, 0);
}

static inline void env_kvfree(const void *ptr)
{
free((void *)ptr);
}

static inline void *env_vmalloc_flags(size_t size, int flags)
{
return malloc(size);
Expand Down
4 changes: 2 additions & 2 deletions src/ocf_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ int ocf_req_alloc_map(struct ocf_request *req)
if (req->map)
return 0;

req->map = env_zalloc(ocf_req_sizeof_map(lines) +
req->map = env_kvzalloc(ocf_req_sizeof_map(lines) +
ocf_req_sizeof_alock_status(req->core_line_count),
ENV_MEM_NOIO);
if (!req->map) {
Expand Down Expand Up @@ -402,7 +402,7 @@ void ocf_req_put(struct ocf_request *req)
env_free(req);
} else {
if (req->map != req->__map)
env_free(req->map);
env_kvfree(req->map);
env_mpool_del(req->cache->owner->resources.req, req,
req->alloc_core_line_count);
}
Expand Down
Loading