mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 04:52:02 +08:00
libc/mallopt: implement dummy mallopt
refs: https://man.freebsd.org/cgi/man.cgi?query=malloc&apropos=0&sektion=3&manpath=SunOS+4.1.3&format=html Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This commit is contained in:
@@ -42,6 +42,17 @@
|
||||
|
||||
#define malloc_usable_size malloc_size
|
||||
|
||||
/* mallopt options that actually do something */
|
||||
|
||||
#define M_TRIM_THRESHOLD -1
|
||||
#define M_TOP_PAD -2
|
||||
#define M_MMAP_THRESHOLD -3
|
||||
#define M_MMAP_MAX -4
|
||||
#define M_CHECK_ACTION -5
|
||||
#define M_PERTURB -6
|
||||
#define M_ARENA_TEST -7
|
||||
#define M_ARENA_MAX -8
|
||||
|
||||
/****************************************************************************
|
||||
* Public Type Definitions
|
||||
****************************************************************************/
|
||||
@@ -83,6 +94,7 @@ extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
int mallopt(int param, int value);
|
||||
struct mallinfo mallinfo(void);
|
||||
size_t malloc_size(FAR void *ptr);
|
||||
struct mallinfo_task mallinfo_task(FAR const struct malltask *task);
|
||||
|
||||
Reference in New Issue
Block a user