diff options
author | Satish Patel <satish.patel@linaro.org> | 2016-04-02 19:08:33 +0530 |
---|---|---|
committer | Satish Patel <satish.patel@linaro.org> | 2016-04-02 19:09:51 +0530 |
commit | 5c4465b95c8eead66400f27e37943e2f1fe7c0b7 (patch) | |
tree | fd20f119f01ee815103353524e5f118c02d83f99 | |
parent | 7eed624495cf23054845c02424305d43a2641610 (diff) | |
download | nedmalloc-5c4465b95c8eead66400f27e37943e2f1fe7c0b7.tar.gz |
Build fix to compile test application
- removed 'register' storage class specifier is deprecated
- mallinfo placed under flag "ACCESS_FROM_BIONIC"
Signed-off-by: Satish Patel <satish.patel@linaro.org>
-rw-r--r-- | nedmalloc.c | 4 | ||||
-rw-r--r-- | nedmalloc.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/nedmalloc.c b/nedmalloc.c index e35c7aa..9ca1359 100644 --- a/nedmalloc.c +++ b/nedmalloc.c @@ -582,8 +582,8 @@ static NEDMALLOCNOALIASATTR mstate nedblkmstate(const void *RESTRICT mem) THROWS FLAG_BITS = bit 0 is CINUSE (currently in use unless is mmap), bit 1 is PINUSE (previous block currently
in use unless mmap), bit 2 is UNUSED and currently is always zero.
*/
- register void *RESTRICT leastusedaddress_=leastusedaddress; /* Cache these to avoid register reloading */
- register size_t largestusedblock_=largestusedblock;
+ void *RESTRICT leastusedaddress_=leastusedaddress; /* Cache these to avoid register reloading */
+ size_t largestusedblock_=largestusedblock;
if(!is_aligned(mem)) return 0; /* Would fail very rarely as all allocators return aligned blocks */
if(mem<leastusedaddress_) return 0; /* Simple but effective */
{
diff --git a/nedmalloc.h b/nedmalloc.h index 325f344..94e148d 100644 --- a/nedmalloc.h +++ b/nedmalloc.h @@ -281,6 +281,7 @@ is no comparable system on POSIX). * malloc) in malloc_common.cpp */ +#ifdef ACCESS_FROM_BIONIC /* use default name for mallinfo. Function & Structure has same name. * so changed function name from nedmallinfo() to nedmallinfo_t() */ @@ -289,6 +290,9 @@ is no comparable system on POSIX). * macro here, used by malloc.h */ #define STRUCT_MALLINFO_DECLARED 1 + +#endif //ACCESS_FROM_BIONIC + #if defined(__cplusplus) extern "C" { #endif |