Commit Graph

2 Commits

Author SHA1 Message Date
Xiang Xiao
3ea8d574fe mm: Implement malloc_usable_size
defined here:
https://man7.org/linux/man-pages/man3/malloc_usable_size.3.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I5988bb28375626188312bd0a0ba3fc12db66f644
2020-08-24 03:36:44 -07:00
YAMAMOTO Takashi
f1814dfca8 Move mallinfo from stdlib.h to malloc.h
mallinfo is meant to be API compatible with Linux,
where it's provided by malloc.h.

Make stdlib.h include malloc.h for now. It can be removed
once all users are updated to include malloc.h instead of
stdlib.h.

I have some app code which uses mallinfo(). I want to share
it between platforms. This commit allows me to reduce
platform-ifdefs.

(I think the API actually originated with System V. I don't
remember how it was there though. Anyway, I guess the
compatibility with Linux is more important than System V
these days.)
2020-06-15 07:21:19 -06:00