mirror of
https://github.com/apache/nuttx.git
synced 2026-10-21 13:52:24 +00: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:
parent
5e3c1985e7
commit
ee598b3e21
3 changed files with 51 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue