Changeset: 013e92296eb8 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/013e92296eb8
Modified Files:
        gdk/gdk_align.c
        gdk/gdk_bat.c
        gdk/gdk_bbp.c
        gdk/gdk_cand.c
        gdk/gdk_hash.c
        gdk/gdk_heap.c
        gdk/gdk_imprints.c
        gdk/gdk_orderidx.c
        gdk/gdk_private.h
        gdk/gdk_storage.c
        gdk/gdk_strimps.c
        gdk/gdk_string.c
Branch: Sep2022
Log Message:

Remove unused argument.


diffs (225 lines):

diff --git a/gdk/gdk_align.c b/gdk/gdk_align.c
--- a/gdk/gdk_align.c
+++ b/gdk/gdk_align.c
@@ -203,7 +203,7 @@ BATmaterialize(BAT *b, BUN cap)
                .dirty = true,
        };
        settailname(tail, BBP_physical(b->batCacheid), TYPE_oid, 0);
-       if (HEAPalloc(tail, cap, sizeof(oid), 0) != GDK_SUCCEED) {
+       if (HEAPalloc(tail, cap, sizeof(oid)) != GDK_SUCCEED) {
                GDKfree(tail);
                return GDK_FAIL;
        }
diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c
--- a/gdk/gdk_bat.c
+++ b/gdk/gdk_bat.c
@@ -280,7 +280,7 @@ COLnew2(oid hseq, int tt, BUN cap, role_
                cap /= 8;       /* 8 values per byte */
 
        /* alloc the main heaps */
-       if (tt && HEAPalloc(bn->theap, cap, bn->twidth, ATOMsize(bn->ttype)) != 
GDK_SUCCEED) {
+       if (tt && HEAPalloc(bn->theap, cap, bn->twidth) != GDK_SUCCEED) {
                goto bailout;
        }
 
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -1267,7 +1267,7 @@ fixhashashbat(BAT *b)
                return GDK_FAIL;
        }
        *h2 = *b->theap;
-       if (HEAPalloc(h2, b->batCapacity, b->twidth, 0) != GDK_SUCCEED) {
+       if (HEAPalloc(h2, b->batCapacity, b->twidth) != GDK_SUCCEED) {
                GDKfree(h2);
                GDKfree(vh2);
                GDKfree(srcdir);
diff --git a/gdk/gdk_cand.c b/gdk/gdk_cand.c
--- a/gdk/gdk_cand.c
+++ b/gdk/gdk_cand.c
@@ -1309,7 +1309,7 @@ BATnegcands(BUN nr, BAT *odels)
        strconcat_len(dels->filename, sizeof(dels->filename),
                      nme, ".theap", NULL);
 
-       if (HEAPalloc(dels, hi - lo + (sizeof(ccand_t)/sizeof(oid)), 
sizeof(oid), 0) != GDK_SUCCEED) {
+       if (HEAPalloc(dels, hi - lo + (sizeof(ccand_t)/sizeof(oid)), 
sizeof(oid)) != GDK_SUCCEED) {
                GDKfree(dels);
                BBPreclaim(bn);
                return NULL;
@@ -1376,7 +1376,7 @@ BATmaskedcands(oid hseq, BUN nr, BAT *ma
                      nme, ".theap", NULL);
 
        nmask = (nr + 31) / 32;
-       if (HEAPalloc(msks, nmask + (sizeof(ccand_t)/sizeof(uint32_t)), 
sizeof(uint32_t), 0) != GDK_SUCCEED) {
+       if (HEAPalloc(msks, nmask + (sizeof(ccand_t)/sizeof(uint32_t)), 
sizeof(uint32_t)) != GDK_SUCCEED) {
                GDKfree(msks);
                BBPreclaim(bn);
                return NULL;
@@ -1488,7 +1488,7 @@ BATunmask(BAT *b)
                    HEAPalloc(dels,
                              cnt * 32 - bi.count
                              + sizeof(ccand_t) / sizeof(oid),
-                             sizeof(oid), 0) != GDK_SUCCEED) {
+                             sizeof(oid)) != GDK_SUCCEED) {
                        GDKfree(dels);
                        BBPreclaim(bn);
                        bat_iterator_end(&bi);
diff --git a/gdk/gdk_hash.c b/gdk/gdk_hash.c
--- a/gdk/gdk_hash.c
+++ b/gdk/gdk_hash.c
@@ -140,13 +140,13 @@ HASHnew(Hash *h, int tpe, BUN size, BUN 
                h->width = HASHwidth(size);
 
        if (!bcktonly) {
-               if (HEAPalloc(&h->heaplink, size, h->width, 0) != GDK_SUCCEED)
+               if (HEAPalloc(&h->heaplink, size, h->width) != GDK_SUCCEED)
                        return GDK_FAIL;
                h->heaplink.free = size * h->width;
                h->heaplink.dirty = true;
                h->Link = h->heaplink.base;
        }
-       if (HEAPalloc(&h->heapbckt, mask + HASH_HEADER_SIZE * SIZEOF_SIZE_T / 
h->width, h->width, 0) != GDK_SUCCEED)
+       if (HEAPalloc(&h->heapbckt, mask + HASH_HEADER_SIZE * SIZEOF_SIZE_T / 
h->width, h->width) != GDK_SUCCEED)
                return GDK_FAIL;
        h->heapbckt.free = mask * h->width + HASH_HEADER_SIZE * SIZEOF_SIZE_T;
        h->heapbckt.dirty = true;
@@ -774,7 +774,7 @@ BAThash_impl(BAT *restrict b, struct can
        strconcat_len(h->heapbckt.filename, sizeof(h->heapbckt.filename),
                      nme, ".", ext, "b", NULL);
        if (HEAPalloc(&h->heaplink, hascand ? ci->ncand : BATcapacity(b),
-                     h->width, 0) != GDK_SUCCEED) {
+                     h->width) != GDK_SUCCEED) {
                GDKfree(h);
                bat_iterator_end(&bi);
                return NULL;
diff --git a/gdk/gdk_heap.c b/gdk/gdk_heap.c
--- a/gdk/gdk_heap.c
+++ b/gdk/gdk_heap.c
@@ -107,7 +107,7 @@ HEAPgrow(Heap **hp, size_t size, bool ma
                        .wasempty = old->wasempty,
                };
                memcpy(new->filename, old->filename, sizeof(new->filename));
-               if (HEAPalloc(new, size, 1, 1) == GDK_SUCCEED) {
+               if (HEAPalloc(new, size, 1) == GDK_SUCCEED) {
                        ATOMIC_INIT(&new->refs, 1 | (refs & HEAPREMOVE));
                        new->free = old->free;
                        new->cleanhash = old->cleanhash;
@@ -137,9 +137,8 @@ HEAPgrow(Heap **hp, size_t size, bool ma
  * Windows, it actually always performs I/O which is not nice).
  */
 gdk_return
-HEAPalloc(Heap *h, size_t nitems, size_t itemsize, size_t itemsizemmap)
+HEAPalloc(Heap *h, size_t nitems, size_t itemsize)
 {
-       (void) itemsizemmap;
        h->base = NULL;
        h->size = 1;
        if (itemsize) {
@@ -454,7 +453,7 @@ GDKupgradevarheap(BAT *b, var_t v, BUN c
                .wasempty = old->wasempty,
        };
        settailname(new, BBP_physical(b->batCacheid), b->ttype, width);
-       if (HEAPalloc(new, newsize, 1, 1) != GDK_SUCCEED) {
+       if (HEAPalloc(new, newsize, 1) != GDK_SUCCEED) {
                GDKfree(new);
                return GDK_FAIL;
        }
@@ -558,7 +557,7 @@ HEAPcopy(Heap *dst, Heap *src, size_t of
 {
        if (offset > src->free)
                offset = src->free;
-       if (HEAPalloc(dst, src->free - offset, 1, 1) == GDK_SUCCEED) {
+       if (HEAPalloc(dst, src->free - offset, 1) == GDK_SUCCEED) {
                dst->free = src->free - offset;
                memcpy(dst->base, src->base + offset, src->free - offset);
                dst->cleanhash = src->cleanhash;
@@ -968,7 +967,7 @@ HEAP_initialize(Heap *heap, size_t nbyte
                size_t total = 100 + nbytes + nprivate + sizeof(HEADER) + 
sizeof(CHUNK);
 
                total = roundup_8(total);
-               if (HEAPalloc(heap, total, 1, 1) != GDK_SUCCEED)
+               if (HEAPalloc(heap, total, 1) != GDK_SUCCEED)
                        return GDK_FAIL;
                heap->free = heap->size;
        }
diff --git a/gdk/gdk_imprints.c b/gdk/gdk_imprints.c
--- a/gdk/gdk_imprints.c
+++ b/gdk/gdk_imprints.c
@@ -562,7 +562,7 @@ BATimprints(BAT *b)
                              pages * (imprints->bits / 8) + /* imps */
                              sizeof(uint64_t) + /* padding for alignment */
                              pages * sizeof(cchdc_t), /* dict */
-                             1, 1) != GDK_SUCCEED) {
+                             1) != GDK_SUCCEED) {
                        MT_lock_unset(&b->batIdxLock);
                        bat_iterator_end(&bi);
                        GDKfree(imprints);
diff --git a/gdk/gdk_orderidx.c b/gdk/gdk_orderidx.c
--- a/gdk/gdk_orderidx.c
+++ b/gdk/gdk_orderidx.c
@@ -142,7 +142,7 @@ createOIDXheap(BAT *b, bool stable)
            strconcat_len(m->filename, sizeof(m->filename),
                          BBP_physical(b->batCacheid), ".torderidx",
                          NULL) >= sizeof(m->filename) ||
-           HEAPalloc(m, BATcount(b) + ORDERIDXOFF, SIZEOF_OID, 0) != 
GDK_SUCCEED) {
+           HEAPalloc(m, BATcount(b) + ORDERIDXOFF, SIZEOF_OID) != GDK_SUCCEED) 
{
                GDKfree(m);
                return NULL;
        }
@@ -369,7 +369,7 @@ GDKmergeidx(BAT *b, BAT**a, int n_ar)
            (m->farmid = BBPselectfarm(b->batRole, bi.type, orderidxheap)) < 0 
||
            strconcat_len(m->filename, sizeof(m->filename),
                          nme, ".torderidx", NULL) >= sizeof(m->filename) ||
-           HEAPalloc(m, BATcount(b) + ORDERIDXOFF, SIZEOF_OID, 0) != 
GDK_SUCCEED) {
+           HEAPalloc(m, BATcount(b) + ORDERIDXOFF, SIZEOF_OID) != GDK_SUCCEED) 
{
                GDKfree(m);
                MT_lock_unset(&b->batIdxLock);
                bat_iterator_end(&bi);
diff --git a/gdk/gdk_private.h b/gdk/gdk_private.h
--- a/gdk/gdk_private.h
+++ b/gdk/gdk_private.h
@@ -194,7 +194,7 @@ BUN HASHmask(BUN cnt)
        __attribute__((__visibility__("hidden")));
 gdk_return HASHnew(Hash *h, int tpe, BUN size, BUN mask, BUN count, bool 
bcktonly)
        __attribute__((__visibility__("hidden")));
-gdk_return HEAPalloc(Heap *h, size_t nitems, size_t itemsize, size_t 
itemsizemmap)
+gdk_return HEAPalloc(Heap *h, size_t nitems, size_t itemsize)
        __attribute__((__warn_unused_result__))
        __attribute__((__visibility__("hidden")));
 gdk_return HEAPcopy(Heap *dst, Heap *src, size_t offset)
diff --git a/gdk/gdk_storage.c b/gdk/gdk_storage.c
--- a/gdk/gdk_storage.c
+++ b/gdk/gdk_storage.c
@@ -801,7 +801,7 @@ BATload_intern(bat bid, bool lock)
        if (b->ttype != TYPE_void) {
                b->theap->storage = b->theap->newstorage = STORE_INVALID;
                if ((b->batCount == 0 ?
-                    HEAPalloc(b->theap, b->batCapacity, b->twidth, 
ATOMsize(b->ttype)) :
+                    HEAPalloc(b->theap, b->batCapacity, b->twidth) :
                     HEAPload(b->theap, b->theap->filename, NULL, 
b->batRestricted == BAT_READ)) != GDK_SUCCEED) {
                        HEAPfree(b->theap, false);
                        return NULL;
diff --git a/gdk/gdk_strimps.c b/gdk/gdk_strimps.c
--- a/gdk/gdk_strimps.c
+++ b/gdk/gdk_strimps.c
@@ -703,7 +703,7 @@ STRMPcreateStrimpHeap(BAT *b, BAT *s)
                                  nme, ".tstrimps",
                                  NULL) >= sizeof(r->strimps.filename) ||
                    HEAPalloc(&r->strimps, BATcount(b) * sizeof(uint64_t) + sz,
-                             sizeof(uint8_t), 0) != GDK_SUCCEED) {
+                             sizeof(uint8_t)) != GDK_SUCCEED) {
                        GDKfree(r);
                        return NULL;
                }
diff --git a/gdk/gdk_string.c b/gdk/gdk_string.c
--- a/gdk/gdk_string.c
+++ b/gdk/gdk_string.c
@@ -71,7 +71,7 @@ strHeap(Heap *d, size_t cap)
 
        cap = MAX(cap, BATTINY);
        size = GDK_STRHASHTABLE * sizeof(stridx_t) + MIN(GDK_ELIMLIMIT, cap * 
GDK_VARALIGN);
-       return HEAPalloc(d, size, 1, 1);
+       return HEAPalloc(d, size, 1);
 }
 
 
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to