aboutsummaryrefslogtreecommitdiffhomepage
path: root/common.h
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-12-09 19:19:39 +0100
committerlemon <lsof@mailbox.org>2025-12-09 19:19:39 +0100
commitc2833c1c84481aea0008898486263f33f65c353d (patch)
tree0f9ceccbe82c3fcfbe70b1df7ef5d0ac9cb39767 /common.h
parent76e8fd27155f5a72298fa75632e865e25bb8e3e0 (diff)
mem: fix pmap_init and change hashmap load factors to 75%
Diffstat (limited to 'common.h')
-rw-r--r--common.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/common.h b/common.h
index 559e685..77d24c4 100644
--- a/common.h
+++ b/common.h
@@ -265,7 +265,7 @@ void pmap_init_(struct pmapbase *, void **v, uint vsiz, uint N);
int pmap_get_(struct pmapbase *, const void *k);
int pmap_set_(struct pmapbase *, void **v, uint vsiz, const void *k);
#define pmap_free(m) (free((m)->mb.k), memset((m), 0, sizeof *(m)))
-#define pmap_init(m, N) (pmap_free(m), pmap_init_(&(m)->mb, (void **)&(m)->v, sizeof*(m)->v, (N))
+#define pmap_init(m, N) (pmap_free(m), pmap_init_(&(m)->mb, (void **)&(m)->v, sizeof*(m)->v, (N)))
#define pmap_get(m, k) (((m)->tmp = pmap_get_(&(m)->mb, k)) < 0 ? NULL : &(m)->v[(m)->tmp])
#define pmap_set(m, k, x) ((m)->tmp = pmap_set_(&(m)->mb, (void **)&(m)->v, sizeof*(m)->v, k), \
(m)->v[(m)->tmp] = (x))