summaryrefslogtreecommitdiff
path: root/include/private/sapp_mem.h
diff options
context:
space:
mode:
authorlijia <[email protected]>2024-05-11 17:56:37 +0800
committeryangwei <[email protected]>2024-05-17 14:10:21 +0800
commit0f7206776498b621de13255189cf1c659c04a701 (patch)
treef7d749e6f4c0796e164de4fea15e60e4b9b6f49a /include/private/sapp_mem.h
parentb497224a3738a8c55768915288eafdeb97573d66 (diff)
TSG-20808,TSG-20954:split bm into multi-partition to avoid long latency by memset large memory;Both bm are queried in transition
Diffstat (limited to 'include/private/sapp_mem.h')
-rw-r--r--include/private/sapp_mem.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/private/sapp_mem.h b/include/private/sapp_mem.h
index d68a0ac..b6b6ca8 100644
--- a/include/private/sapp_mem.h
+++ b/include/private/sapp_mem.h
@@ -46,14 +46,14 @@ typedef enum{
SAPP_MEM_DYN_PADDR, /* 每层地址所占的内存, 就不分具体协议了, 太麻烦了!! */
SAPP_MEM_DYN_DETAIN_PKT,
SAPP_MEM_DYN_SID_LIST,
-
+ SAPP_MEM_DYN_BLOOM_FILTER,
__SAPP_MEM_TYPE_MAX,
}sapp_mem_type_t;
-void *sapp_mem_malloc(sapp_mem_type_t type, int thread_seq, int size);
-void *sapp_mem_calloc(sapp_mem_type_t type, int thread_seq, int size);
+void *sapp_mem_malloc(sapp_mem_type_t type, int thread_seq, unsigned int size);
+void *sapp_mem_calloc(sapp_mem_type_t type, int thread_seq, unsigned int size);
void sapp_mem_free(sapp_mem_type_t type, int thread_seq, void *data);
-void *sapp_mem_realloc(sapp_mem_type_t type, int thread_seq, void *old_ptr, int size);
+void *sapp_mem_realloc(sapp_mem_type_t type, int thread_seq, void *old_ptr, unsigned int size);
void sapp_mem_stat_output(void);
#ifndef SAPP_FREE
@@ -69,6 +69,8 @@ void sapp_mem_stat_output(void);
#define SAPP_GLOBAL_FREE(mem) do{if(mem){sapp_mem_free(SAPP_MEM_FIX_GLOBAL_VAL, MEM_STAT_GLOBAL_THREAD_ID, (void *)mem); mem = NULL;}}while(0)
#endif
+int bloomfilter_get_mem_stat(int tseq, long long *mem_blocks, long long *mem_bytes);
+
#ifdef __cplusplus
}
#endif