about summary refs log tree commit diff stats
path: root/src/wrapped
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-04-01 11:42:09 +0200
committerptitSeb <sebastien.chev@gmail.com>2021-04-01 11:42:09 +0200
commit4ae53916378fa47d5eec289a95c7befa4c5241ad (patch)
treed892305c8e462257a06d6272d44a5b2fb3d365da /src/wrapped
parent28e11dec310102cf916ca9f1555a159625cd9cb8 (diff)
downloadbox64-4ae53916378fa47d5eec289a95c7befa4c5241ad.tar.gz
box64-4ae53916378fa47d5eec289a95c7befa4c5241ad.zip
Wrapped malloc to call calloc instead (not sure it's really needed)
Diffstat (limited to 'src/wrapped')
-rwxr-xr-xsrc/wrapped/wrappedlibc.c7
-rwxr-xr-xsrc/wrapped/wrappedlibc_private.h2
2 files changed, 3 insertions, 6 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c
index 9262060b..5807bb37 100755
--- a/src/wrapped/wrappedlibc.c
+++ b/src/wrapped/wrappedlibc.c
@@ -2092,15 +2092,12 @@ EXPORT int my_nanosleep(const struct timespec *req, struct timespec *rem)
         return 0;   // workaround for some strange calls
     return nanosleep(req, rem);
 }
-
-#ifndef NOALIGN
-// wrapped malloc using calloc, it seems x86 malloc set alloc'd block to zero somehow
+#endif
 EXPORT void* my_malloc(unsigned long size)
 {
     return calloc(1, size);
 }
-#endif
-
+#if 0
 #ifdef PANDORA
 #define RENAME_NOREPLACE	(1 << 0)
 #define RENAME_EXCHANGE		(1 << 1)
diff --git a/src/wrapped/wrappedlibc_private.h b/src/wrapped/wrappedlibc_private.h
index 880d8561..0d5730fe 100755
--- a/src/wrapped/wrappedlibc_private.h
+++ b/src/wrapped/wrappedlibc_private.h
@@ -1100,7 +1100,7 @@ GO(__madvise, iFpLi)
 GOW(madvise, iFpLi)
 GOM(makecontext, iFEppiV)   //weak
 //GOW(mallinfo, 
-GO(malloc, pFL) // need to wrap to clear allocated memory?
+GOM(malloc, pFL) // need to wrap to clear allocated memory?
 //GO(malloc_get_state, 
 //GOW(malloc_info, 
 //GO(malloc_set_state,