]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
WIP
authorOndrej Sury <ondrej@calcifer.home.sury.org>
Fri, 26 Feb 2021 07:33:12 +0000 (08:33 +0100)
committerOndřej Surý <ondrej@sury.org>
Wed, 3 Mar 2021 14:32:01 +0000 (15:32 +0100)
lib/isc/mem.c
lib/isc/tests/mem_test.c

index b81afb4638842c226ef5fbf21e5589c3330f6c22..224cb5d71740ac9befc88aa263b61a6133a13ed9 100644 (file)
@@ -1358,23 +1358,12 @@ isc__mempool_put(isc_mempool_t *mpctx, void *mem FLARG) {
        REQUIRE(mem != NULL);
        REQUIRE(isc_tid_v < mpctx->max_threads);
 
-       isc_mem_t *mctx = mpctx->mctx;
        element *item;
        size_t allocated = atomic_fetch_sub_relaxed(&mpctx->allocated, 1);
        (void)atomic_fetch_add_relaxed(&mpctx->freecount[isc_tid_v], 1);
-       /* size_t freecount = atomic_fetch_add_relaxed(&mpctx->freecount[isc_tid_v], 1); */
-       /* size_t freemax = ISC_MAX(allocated, 8); */
 
        INSIST(allocated > 0);
 
-       /* while (freecount > freemax) { */
-       /*      item = mpctx->items[isc_tid_v]; */
-       /*      mpctx->items[isc_tid_v] = item->next; */
-       /*      freecount = atomic_fetch_sub_relaxed(&mpctx->freecount[isc_tid_v], 1); */
-       /*      mem_putstats(mctx, item, mpctx->size); */
-       /*      mem_put(mctx, item, mpctx->size); */
-       /* } */
-
        DELETE_TRACE(mctx, mem, mpctx->size, file, line);
 
        item = (element *)mem;
index 52ec5dff93e17dedb9572deb7a0b16a973634f04..2633f220f449846fe7c25964970c40ca067b45b9 100644 (file)
@@ -355,7 +355,7 @@ isc_mem_traceflag_test(void **state) {
 
 #define ITERS    512
 #define NUM_ITEMS 1024 /* 768 */
-#define ITEM_SIZE 1024
+#define ITEM_SIZE 65534
 #define MP_ITEM_SIZE 256
 
 static atomic_size_t mem_size;