aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorFabrice <fabrice@schaub-dev.xyz>2026-04-12 21:17:13 +0200
committerFabrice <fabrice@schaub-dev.xyz>2026-04-12 21:17:13 +0200
commit4b15348415a9c6b2ba719c65eafdc008bf5c20e0 (patch)
treed8b9dc8a485e6f434955005c3c7cc7a54c60cdcd /README.md
parentd513ca9634142bf3ec681cfd561ff7cb005304d1 (diff)
fix alignment UB
Diffstat (limited to 'README.md')
-rw-r--r--README.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/README.md b/README.md
index 3c9c05a..b09414a 100644
--- a/README.md
+++ b/README.md
@@ -45,10 +45,10 @@ bool compare_string(const cm_u8* key1, const cm_u8* key2, cm_u8* user) {
return strcmp(*(const char**)key1, *(const char**)key2) == 0;
}
-// Default allocator (uses malloc)
-void* default_alloc(cm_usize size, cm_u8* user) {
+// Default allocator (uses aligned_alloc)
+void* default_alloc(cm_usize size, cm_usize align, cm_u8* user) {
(void)user;
- return malloc(size);
+ return aligned_alloc(align, size);
}
// Default deallocator (uses free)