summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2016-12-27 09:32:25 +0200
committerHanoh Haim <hhaim@cisco.com>2016-12-27 09:32:39 +0200
commit2bca2294402a83393ea2023dfbf20d7e19677031 (patch)
tree6c12f97eac3992247bd3c3cfd61c92b636c0707d /src/common
parent9ad36b3da3d33cad1d0fbb629707515381260648 (diff)
add ef posix_memalign function
Signed-off-by: Hanoh Haim <hhaim@cisco.com>
Diffstat (limited to 'src/common')
-rw-r--r--src/common/ef/efence.cpp9
1 files changed, 8 insertions, 1 deletions
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.