Skip to content
Snippets Groups Projects
Commit 7d2c90a6 authored by Cheng Shao's avatar Cheng Shao
Browse files

dlmalloc: avoid hard-wiring MALLOC_ALIGNMENT

parent cfb96940
No related branches found
No related tags found
No related merge requests found
// This file is a wrapper around malloc.c, which is the upstream source file. // This file is a wrapper around malloc.c, which is the upstream source file.
// It sets configuration flags and controls which symbols are exported. // It sets configuration flags and controls which symbols are exported.
#include <stdalign.h>
#include <stddef.h> #include <stddef.h>
#include <malloc.h> #include <malloc.h>
...@@ -27,8 +28,8 @@ ...@@ -27,8 +28,8 @@
#define NO_MALLINFO 1 #define NO_MALLINFO 1
#define NO_MALLOC_STATS 1 #define NO_MALLOC_STATS 1
// Align malloc regions to 16, to avoid unaligned SIMD accesses. // Conform to C standard requirement
#define MALLOC_ALIGNMENT 16 #define MALLOC_ALIGNMENT alignof(max_align_t)
// Declare errno values used by dlmalloc. We define them like this to avoid // Declare errno values used by dlmalloc. We define them like this to avoid
// putting specific errno values in the ABI. // putting specific errno values in the ABI.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment