ref: 76086513de9efd7a000d0bc229c3e990f0af5a2f
parent: 6799d5048886a3c61b200bf367f305bf8c068164
author: Ori Bernstein <ori@eigenstate.org>
date: Thu Oct 1 21:51:47 EDT 2015
Faster filling on free. Do it in chunks of size 8.
--- a/lib/std/alloc.myr
+++ b/lib/std/alloc.myr
@@ -231,9 +231,9 @@
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)]