diff options
author | wangyalei <wylandrea@gmail.com> | 2018-07-24 02:37:52 +0800 |
---|---|---|
committer | Yalei Wang <william.wangyalei@huawei.com> | 2018-08-14 16:48:34 +0800 |
commit | 1c5d7496f4c7f5d0358d8b57781fd471882b1ece (patch) | |
tree | 695a843e8d885746be1416955a4f4e82b90cc91a /src/framework/common | |
parent | c080b73a936e0fcdb2d90b32a38135edde2d8fa7 (diff) |
Feat: Add a new type 4 for simple stack integration
When simple stack integration(type=4), only alloc necessary memory(32M),
and add prefix to differentiate the apps in primary mode.
Change-Id: Ide8b3a276e999827b7ad3321cbd62cff127c2d44
Signed-off-by: Yalei Wang <william.wangyalei@huawei.com>
Diffstat (limited to 'src/framework/common')
-rw-r--r-- | src/framework/common/base/include/common/common_mem_buf.h | 3 | ||||
-rw-r--r-- | src/framework/common/mem_mgr/nsfw_shmem/nsfw_shmem_mng.c | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/framework/common/base/include/common/common_mem_buf.h b/src/framework/common/base/include/common/common_mem_buf.h index 441da6a..f9f1593 100644 --- a/src/framework/common/base/include/common/common_mem_buf.h +++ b/src/framework/common/base/include/common/common_mem_buf.h @@ -21,6 +21,7 @@ #else #include "common_mem_base_type.h" +#include "types.h" typedef enum __DMM_PROC_TYPE { @@ -63,7 +64,7 @@ typedef struct __common_pal_module_info * @param name * The name of the buf pool. */ -int nscomm_pal_module_init (common_mem_pal_module_info * pinfo); +int nscomm_pal_module_init (common_mem_pal_module_info * pinfo, u8 app_mode); void *nscomm_memzone_data_reserve_name (const char *name, size_t len, int socket_id); diff --git a/src/framework/common/mem_mgr/nsfw_shmem/nsfw_shmem_mng.c b/src/framework/common/mem_mgr/nsfw_shmem/nsfw_shmem_mng.c index 2622809..abd6ce0 100644 --- a/src/framework/common/mem_mgr/nsfw_shmem/nsfw_shmem_mng.c +++ b/src/framework/common/mem_mgr/nsfw_shmem/nsfw_shmem_mng.c @@ -37,6 +37,7 @@ #define NSFW_SHMEM_PID (get_sys_pid()) #define NSFW_SHMEM_FLAG (g_shmem_localdata->enflag) +extern u8 app_mode; nsfw_mem_localdata *g_shmem_localdata = NULL; /*check g_mem_localdata*/ @@ -75,13 +76,13 @@ nsfw_shmem_init (nsfw_mem_para * para) } else if (NSFW_PROC_MAIN == para->enflag) { - iret = common_pal_module_init (NULL); + iret = common_pal_module_init (NULL, app_mode); } else { LCORE_MASK_SET (rteinfo.ilcoremask, 1); rteinfo.ucproctype = DMM_PROC_T_SECONDARY; - iret = common_pal_module_init (&rteinfo); + iret = common_pal_module_init (&rteinfo, app_mode); } if (NSFW_MEM_OK != iret) |