Code Review
/
trex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
9ad36b3
)
add ef posix_memalign function
19/5219/1
author
Hanoh Haim
<
[email protected]
>
Tue, 27 Dec 2016 07:32:25 +0000
(09:32 +0200)
committer
Hanoh Haim
<
[email protected]
>
Tue, 27 Dec 2016 07:32:39 +0000
(09:32 +0200)
Signed-off-by: Hanoh Haim <
[email protected]
>
src/common/ef/efence.cpp
patch
|
blob
|
history
diff --git
a/src/common/ef/efence.cpp
b/src/common/ef/efence.cpp
index
1340a12
..
b74d3da
100644
(file)
--- 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.