提交 7f3b6d54 编写于 作者: R r00490903

Publish mallopt api

Provides memory cache management interfaces for third-party applications.

Issue: I79COU
Test:Build & Boot devices
Signed-off-by: Ngoblinrs <renshang@huawei.com>
上级 73c0c696
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
static int test_mallopt() static int test_mallopt()
{ {
return mallopt(0, 0) != 0; return mallopt(0, 0) == 0;
} }
int main() int main()
......
...@@ -9,6 +9,16 @@ extern "C" { ...@@ -9,6 +9,16 @@ extern "C" {
#include <bits/alltypes.h> #include <bits/alltypes.h>
#define M_SET_THREAD_CACHE -1001
#define M_THREAD_CACHE_ENABLE 1
#define M_THREAD_CACHE_DISABLE 0
#define M_FLUSH_THREAD_CACHE -1002
#define M_DELAYED_FREE -1003
#define M_DELAYED_FREE_ENABLE 1
#define M_DELAYED_FREE_DISABLE 0
void *malloc (size_t); void *malloc (size_t);
void *calloc (size_t, size_t); void *calloc (size_t, size_t);
void *realloc (void *, size_t); void *realloc (void *, size_t);
...@@ -17,6 +27,7 @@ void *valloc (size_t); ...@@ -17,6 +27,7 @@ void *valloc (size_t);
void *memalign(size_t, size_t); void *memalign(size_t, size_t);
size_t malloc_usable_size(void *); size_t malloc_usable_size(void *);
int mallopt(int param, int value);
struct mallinfo { struct mallinfo {
int arena; int arena;
......
...@@ -736,6 +736,7 @@ ...@@ -736,6 +736,7 @@
{ "name": "lutimes" }, { "name": "lutimes" },
{ "name": "madvise" }, { "name": "madvise" },
{ "name": "malloc" }, { "name": "malloc" },
{ "name": "mallopt" },
{ "name": "malloc_usable_size" }, { "name": "malloc_usable_size" },
{ "name": "mblen" }, { "name": "mblen" },
{ "name": "mbrlen" }, { "name": "mbrlen" },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册