summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/std/alloc.myr5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/std/alloc.myr b/lib/std/alloc.myr
index aefa179..ac32ce5 100644
--- a/lib/std/alloc.myr
+++ b/lib/std/alloc.myr
@@ -6,6 +6,7 @@ use "threadhooks"
use "types"
use "units"
use "bytealloc"
+use "memops"
/*
The allocator implementation here is based on Bonwick's slab allocator.
@@ -142,9 +143,7 @@ generic slgrow = {sl : @a[:]#, len
new = slalloc(cap)
n = min(len, sl#.len)
- for var i = 0; i < n; i++
- new[i] = sl#[i]
- ;;
+ memblit((new : byte#), (sl# : byte#), n * sizeof(@a))
if sl#.len > 0
slfree(sl#)
;;