From c2833c1c84481aea0008898486263f33f65c353d Mon Sep 17 00:00:00 2001 From: lemon Date: Tue, 9 Dec 2025 19:19:39 +0100 Subject: mem: fix pmap_init and change hashmap load factors to 75% --- common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common.h') 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)) -- cgit v1.2.3