From f0132d16ea6f75f00089866a537702417201cd05 Mon Sep 17 00:00:00 2001 From: Damian Duy Date: Tue, 11 Jul 2023 12:21:07 +0200 Subject: [PATCH] add handling unsupported functions for disjoint pool --- source/common/umf_pools/disjoint_pool.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source/common/umf_pools/disjoint_pool.cpp b/source/common/umf_pools/disjoint_pool.cpp index 0a5622588e..8b1f993355 100644 --- a/source/common/umf_pools/disjoint_pool.cpp +++ b/source/common/umf_pools/disjoint_pool.cpp @@ -908,13 +908,13 @@ void *DisjointPool::malloc(size_t size) { // For full-slab allocations indicates void *DisjointPool::calloc(size_t, size_t) { // Not supported - assert(false); + umf::getPoolLastStatusRef() = UMF_RESULT_ERROR_NOT_SUPPORTED; return NULL; } void *DisjointPool::realloc(void *, size_t) { // Not supported - assert(false); + umf::getPoolLastStatusRef() = UMF_RESULT_ERROR_NOT_SUPPORTED; return NULL; } @@ -934,8 +934,6 @@ void *DisjointPool::aligned_malloc(size_t size, size_t alignment) { size_t DisjointPool::malloc_usable_size(void *) { // Not supported - assert(false); - return 0; }