summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/memory.cc2
-rw-r--r--src/voidc.cc3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/memory.cc b/src/memory.cc
index 27504f0..c27c6f3 100644
--- a/src/memory.cc
+++ b/src/memory.cc
@@ -24,7 +24,7 @@ void deallocate(Allocator* allocator, u8* ptr) {
static inline u8* heap_allocate(u8* self, usize size, usize align) {
(void)self;
- return (u8*)aligned_alloc(size, align);
+ return (u8*)aligned_alloc(align, size);
}
static inline void heap_deallocate(u8* self, u8* ptr) {
diff --git a/src/voidc.cc b/src/voidc.cc
index 9e9c38f..2dd91f9 100644
--- a/src/voidc.cc
+++ b/src/voidc.cc
@@ -1,5 +1,6 @@
#include "memory.cc"
#include "common.cc"
+#include <cstring>
static const char* SOURCE = R"(
#include <stdlib.h>
@@ -9,7 +10,7 @@ int main() {
}
)";
-static const String SOURCE_STRING = { (u8*)SOURCE, sizeof(SOURCE) - 1 };
+static const String SOURCE_STRING = { (u8*)SOURCE, strlen(SOURCE) };
int main() {
String source;