harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit a99611ac5b1f6837b16004a99faa5a5eaa7b30f1
parent fe1034a6e4b2cdfc00ac66a93518dbbaab6e2070
Author: Drew DeVault <sir@cmpwn.com>
Date:   Sun, 24 Jan 2021 13:28:05 -0500

rt::malloc: use array expansion

Diffstat:
Mrt/malloc.ha | 9+--------
1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/rt/malloc.ha b/rt/malloc.ha @@ -36,14 +36,7 @@ def WORD: size = size(size); def WASTE: size = WORD * ALIGN - WORD; def BIGBLOCK: size = (2z << 16z) * WORD; -// TODO: Expandable arrays -let bins: [50]nullable *void = [ - null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, null, null, null, - null, null, -]; +let bins: [50]nullable *void = [null...]; fn bin2size(b: size) size = ((b + 1z) * ALIGN - 1z) * WORD;