commit 33c8dd1efe22acc67a52fc5b0bdef70abf618383
parent 31effd03276ec06af41c6ddafb6af2a58c249075
Author: vaplv <vaplv@free.fr>
Date: Tue, 10 Jul 2018 10:53:21 +0200
Change the default alignment of the proxy allocations
It seems that some version of the GCC C++ compiler (GCC 7.3.0 and later)
have issues in release with the default copy operator and dynamically
allocated objects not aligned on 16 Bytes: the default alignment
of a proxy allocation was 8 bytes and one can observe memory access
violation when the default copy operator was invoked on objects aligned
on 8 bytes. To workaround this issue the default alignment of a proxy
allocation is now set to 16 Bytes.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mem_proxy_allocator.c b/src/mem_proxy_allocator.c
@@ -37,7 +37,7 @@ struct mem_node {
char reserved[2];
};
-#define PROXY_DEFAULT_ALIGNMENT 8
+#define PROXY_DEFAULT_ALIGNMENT 16
/*******************************************************************************
* Helper functions