Fix declaration of malloc_usable_size()

The function should take a 'const void*' parameter, instead of 'void*'.
Note that the implementation in upstream-dlmalloc/malloc.c already does
this.

For context, see http://b.android.com/55725

Change-Id: Iefd55cdb8996699189e0545f9195972490306227
This commit is contained in:
David 'Digit' Turner 2013-05-23 10:02:02 +02:00
parent f5f29de6ae
commit 25a87f7641
2 changed files with 2 additions and 2 deletions

View File

@ -190,7 +190,7 @@ extern "C" struct mallinfo mallinfo() {
return dlmallinfo();
}
extern "C" size_t malloc_usable_size(void* mem) {
extern "C" size_t malloc_usable_size(const void* mem) {
return dlmalloc_usable_size(mem);
}

View File

@ -33,7 +33,7 @@ extern void* realloc(void* p, size_t byte_count) __wur;
extern void free(void* p);
extern void* memalign(size_t alignment, size_t byte_count) __mallocfunc __wur;
extern size_t malloc_usable_size(void* p);
extern size_t malloc_usable_size(const void* p);
extern void* valloc(size_t byte_count) __mallocfunc __wur;
extern void* pvalloc(size_t byte_count) __mallocfunc __wur;