Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forward type alignments to allocators #12430

Merged
merged 17 commits into from
Apr 19, 2020
Prev Previous commit
Next Next commit
use alignas
  • Loading branch information
krux02 committed Nov 11, 2019
commit c22c3db9adb851c3dab370b5178e0ae580157a99
5 changes: 4 additions & 1 deletion lib/nimalloc.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#include <stdalign.h>

// this type is used in alloc.nim. It is intended to ensure 16 byte
// alignments for all allocations.
typedef struct {} __attribute__ ((aligned (16))) NimAlign16Type;
typedef struct {
alignas(16) char unused;
} NimAlign16Type;