diff options
| author | Nakst <nakst@protonmail.com> | 2021-03-14 20:37:32 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-14 20:37:32 +0000 |
| commit | acefb2edbc886f6ae1cbc7cb494383511e4d4eea (patch) | |
| tree | 89420f2546189d760029ccb5d1186bdf332024aa /src/common.cpp | |
| parent | f5142aaec41edbb85f9306216c6b199fa5adb7bb (diff) | |
Similar to the update to gb.h
Diffstat (limited to 'src/common.cpp')
| -rw-r--r-- | src/common.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common.cpp b/src/common.cpp index c751d4597..2e24c0c43 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -116,7 +116,7 @@ GB_ALLOCATOR_PROC(heap_allocator_proc) { #elif defined(GB_SYSTEM_LINUX) // TODO(bill): *nix version that's decent case gbAllocation_Alloc: { - ptr = aligned_alloc(alignment, size); + ptr = aligned_alloc(alignment, (size + alignment - 1) & ~(alignment - 1)); // ptr = malloc(size+alignment); if (flags & gbAllocatorFlag_ClearToZero) { |