aboutsummaryrefslogtreecommitdiff
path: root/src/pmem.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-08-26 23:18:05 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-08-26 23:18:05 +0300
commit280e963e1334a21778e2f257fe09daa4890074a1 (patch)
tree6f21c7541163ace072a0d2be06274b0bf6b2dd2d /src/pmem.c
parent3f194f1c7264945a63b0018b159cc83bd9385c59 (diff)
downloadkmi-280e963e1334a21778e2f257fe09daa4890074a1.tar.gz
kmi-280e963e1334a21778e2f257fe09daa4890074a1.zip
add magic assert
Diffstat (limited to 'src/pmem.c')
-rw-r--r--src/pmem.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pmem.c b/src/pmem.c
index 871e15a..a0cd4ec 100644
--- a/src/pmem.c
+++ b/src/pmem.c
@@ -277,6 +277,10 @@ static pm_t __alloc_page(enum mm_order order)
__get_bit(bucket, a, &set, &bit);
bmap = __get_set(bucket, set);
+ /* hmm, I might be running into a compiler bug here. Adding this
+ * assert makes my error go away, weird. */
+ assert(bmap->size <= order_width(order + 1));
+
bmap->next = NULL;
bmap->prev = NULL;
bmap->used = 0;