From 0d1e125832d0fd8ca31c5f782e7c3db774ae5a02 Mon Sep 17 00:00:00 2001 From: lemon Date: Sun, 14 Aug 2022 11:16:03 +0200 Subject: woa --- src/map.hff | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/map.hff') diff --git a/src/map.hff b/src/map.hff index 87d0506..d7883dd 100644 --- a/src/map.hff +++ b/src/map.hff @@ -1,4 +1,5 @@ -import "all.hff"; +import "common.hff"; +import "util.hff"; // KTraits: // :hash(K) u32 @@ -32,6 +33,8 @@ struct Map { } fn _reallockvb(self *Map) void { + // keys, vals, bitmap are in a contiguous memory allocation, + // XXX ^ alignment let p = xcalloc((self.N * (sizeof K + sizeof V)) + (self.N / 8), 1); self.keys = p; self.vals = as(*V)(self.keys + self.N); -- cgit v1.2.3