aboutsummaryrefslogtreecommitdiff
path: root/std
diff options
context:
space:
mode:
Diffstat (limited to 'std')
-rw-r--r--std/common.cup2
-rw-r--r--std/vector.cup2
2 files changed, 2 insertions, 2 deletions
diff --git a/std/common.cup b/std/common.cup
index c2d008e..3d0b269 100644
--- a/std/common.cup
+++ b/std/common.cup
@@ -214,7 +214,7 @@ fn factorial(n: int): int {
}
fn align_up(val: int, algn: int): int {
- return 8;
+ return (val + algn - 1) & ~(algn - 1);
}
///////////////////////////////////////////////////////////////////////////////
diff --git a/std/vector.cup b/std/vector.cup
index 6b42fdc..6953e9b 100644
--- a/std/vector.cup
+++ b/std/vector.cup
@@ -15,7 +15,7 @@ fn vector_new_sized(capacity: int): Vector* {
}
fn vector_new(): Vector* {
- const initial_default_capacity = 4;
+ const initial_default_capacity = 8;
return vector_new_sized(initial_default_capacity);
}