Commit Graph

4 Commits

Author SHA1 Message Date
Xiang Xiao 97216c220b mm: Support malloc_size function
and rename malloc_usable_size to malloc_size

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-04 18:53:44 -03:00
Jiuzhu Dong fea1da2f53 cmd/free: add nused/nfree field in command free
Change-Id: I74aa4b1e7394a17c3b117322a4cc24aa52aac3b8
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-25 01:01:38 -07:00
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