summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-10-02 01:51:47 -0700
committerOri Bernstein <ori@eigenstate.org>2015-10-02 19:10:43 -0700
commit76086513de9efd7a000d0bc229c3e990f0af5a2f (patch)
tree029f46607567e20d00483a0f12a8b5027b2fe3d8
parent6799d5048886a3c61b200bf367f305bf8c068164 (diff)
downloadmc-76086513de9efd7a000d0bc229c3e990f0af5a2f.tar.gz
Faster filling on free.
Do it in chunks of size 8.
-rw-r--r--lib/std/alloc.myr6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/alloc.myr b/lib/std/alloc.myr
index ef0037b..342354b 100644
--- a/lib/std/alloc.myr
+++ b/lib/std/alloc.myr
@@ -231,9 +231,9 @@ const bytefree = {p, sz
var bkt
var b, i
- b = p[:sz]
- for i = 0; i < sz; i++
- b[i] = 0xa8
+ b = (p castto(uint64#))[:sz/8]
+ for i = 0; i < sz>>3; i++
+ b[i] = 0xa8a8a8a8a8a8a8a8
;;
if (sz < Bktmax)
bkt = &buckets[bktnum(sz)]