Remove unused isc_mem_createx() function
The isc_mem_createx() function was only used in the tests to eliminate using the default flags (which as of writing this commit message was ISC_MEMFLAG_INTERNAL and ISC_MEMFLAG_FILL). This commit removes the isc_mem_createx() function from the public API.
This commit is contained in:
@@ -31,21 +31,6 @@
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
static void *
|
||||
default_memalloc(void *arg, size_t size) {
|
||||
UNUSED(arg);
|
||||
if (size == 0U) {
|
||||
size = 1;
|
||||
}
|
||||
return (malloc(size));
|
||||
}
|
||||
|
||||
static void
|
||||
default_memfree(void *arg, void *ptr) {
|
||||
UNUSED(arg);
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
static void
|
||||
test_ht_full(int bits, uintptr_t count) {
|
||||
isc_ht_t *ht = NULL;
|
||||
@@ -53,8 +38,7 @@ test_ht_full(int bits, uintptr_t count) {
|
||||
isc_mem_t *mctx = NULL;
|
||||
uintptr_t i;
|
||||
|
||||
isc_mem_createx(default_memalloc, default_memfree,
|
||||
NULL, &mctx, 0);
|
||||
isc_mem_create(&mctx);
|
||||
|
||||
result = isc_ht_init(&ht, mctx, bits);
|
||||
assert_int_equal(result, ISC_R_SUCCESS);
|
||||
@@ -206,8 +190,7 @@ test_ht_iterator() {
|
||||
unsigned char key[16];
|
||||
size_t tksize;
|
||||
|
||||
isc_mem_createx(default_memalloc, default_memfree,
|
||||
NULL, &mctx, 0);
|
||||
isc_mem_create(&mctx);
|
||||
|
||||
result = isc_ht_init(&ht, mctx, 16);
|
||||
assert_int_equal(result, ISC_R_SUCCESS);
|
||||
|
||||
Reference in New Issue
Block a user