implement Android M_PURGE mallopt via malloc_trim
parent
4f08e40fe5
commit
3d18fb8074
|
@ -1557,6 +1557,12 @@ EXPORT size_t h_malloc_object_size_fast(void *p) {
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT int h_mallopt(UNUSED int param, UNUSED int value) {
|
EXPORT int h_mallopt(UNUSED int param, UNUSED int value) {
|
||||||
|
#ifdef __ANDROID__
|
||||||
|
if (param == M_PURGE) {
|
||||||
|
h_malloc_trim(0);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue