diff --git a/h_malloc.c b/h_malloc.c index 83d3435..ad00b82 100644 --- a/h_malloc.c +++ b/h_malloc.c @@ -1557,6 +1557,12 @@ EXPORT size_t h_malloc_object_size_fast(void *p) { } 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; }