From 2bca2294402a83393ea2023dfbf20d7e19677031 Mon Sep 17 00:00:00 2001 From: Hanoh Haim Date: Tue, 27 Dec 2016 09:32:25 +0200 Subject: add ef posix_memalign function Signed-off-by: Hanoh Haim --- src/common/ef/efence.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/common/ef/efence.cpp b/src/common/ef/efence.cpp index 1340a12a..b74d3da5 100644 --- a/src/common/ef/efence.cpp +++ b/src/common/ef/efence.cpp @@ -821,7 +821,6 @@ ef_malloc(size_t size) lock(); allocation=ef_memalign(EF_ALIGNMENT, size); - /* put 0xaa into the memset to find uninit issues */ memset(allocation,0xaa,size); #if 0 @@ -897,6 +896,14 @@ calloc(size_t nelem, size_t elsize) return (ef_calloc(nelem, elsize)); } +extern C_LINKAGE int +posix_memalign(void **memptr, size_t alignment, size_t size) +{ + *memptr=ef_malloc(size); + return(0); +} + + /* * This will catch more bugs if you remove the page alignment, but it * will break some software. -- cgit 1.2.3-korg