aboutsummaryrefslogtreecommitdiff
path: root/src/vec.hff
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2022-08-19 06:57:21 +0200
committerlemon <lsof@mailbox.org>2022-08-19 06:57:21 +0200
commitf64f691a43f474b450f29795b4bc68bc2ef6231e (patch)
tree7e949c593a66118d4a8a1043f664e363affa96f8 /src/vec.hff
parente07baf707f097434cbe4739d3fcf1bc27a62d587 (diff)
take alignment in allocator
Diffstat (limited to 'src/vec.hff')
-rw-r--r--src/vec.hff2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vec.hff b/src/vec.hff
index 2966579..4d877d8 100644
--- a/src/vec.hff
+++ b/src/vec.hff
@@ -38,7 +38,7 @@ struct Vec<T> {
fn move(vec *Vec, alloc *Allocator) [#]T {
let len = vec.len;
- let dat *T = alloc->alloc(len * sizeof T);
+ let dat *T = alloc->alloc(len * sizeof T, alignof T);
memcpy(dat, vec.dat, len * sizeof T);
vec->clear();
return dat[0::len];