From 096bbda71ea301fe6dbdc603b5cbf06bfc0d73ed Mon Sep 17 00:00:00 2001 From: 鏉ㄥ▉ Date: Tue, 20 Jun 2023 16:01:35 +0800 Subject: 馃 refactor(Remove obsolete code): makefile and dictator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/private/dictator.h | 32 -------------------------------- include/private/sapp_declaration.h | 1 - include/private/sapp_global_val.h | 5 ----- include/private/sapp_mem.h | 2 -- include/private/sapp_private_api.h | 1 - include/support/dictator.h | 30 ------------------------------ 6 files changed, 71 deletions(-) delete mode 100644 include/private/dictator.h delete mode 100644 include/support/dictator.h (limited to 'include') diff --git a/include/private/dictator.h b/include/private/dictator.h deleted file mode 100644 index d711c4a..0000000 --- a/include/private/dictator.h +++ /dev/null @@ -1,32 +0,0 @@ -/* DICATATOR Memory Manager -* Version 20141115 -* zhengchao@iie.ac.cn -*/ -#ifndef _DICTATOR2_H_ -#define _DICTATOR2_H_ - -#ifdef __cplusplus -extern "C"{ -#endif - -#include - -void *__wrap_malloc(size_t size); -void __wrap_free(void *p); -void *__wrap_realloc(void *ptr, size_t size); -void *__wrap_calloc(size_t nmemb, size_t size); - -void *__dictator_malloc(int t_seq,size_t size); -void __dictator_free(int t_seq,void*p); -void *__dictator_realloc(int t_seq,void *ptr, size_t size); -void *__dictator_calloc(int t_seq,size_t nmemb, size_t size); - -void *malloc(size_t size); -void *calloc(size_t nmemb, size_t size); -void free(void *p); - -#ifdef __cplusplus -} -#endif// end extern "C" - -#endif diff --git a/include/private/sapp_declaration.h b/include/private/sapp_declaration.h index b505ed2..e5260a9 100644 --- a/include/private/sapp_declaration.h +++ b/include/private/sapp_declaration.h @@ -86,7 +86,6 @@ extern sapp_global_t *sapp_global_val; #define g_ipv6_decapsulation_enabled sapp_global_val->config.protocol_feature.ipv6_decapsulation_enabled #define g_ipv6_send_packet_enabled sapp_global_val->config.protocol_feature.ipv6_send_packet_enabled #define G_SKIP_NOT_IP_LAYER sapp_global_val->config.protocol_feature.skip_not_ip_layer_over_eth -#define G_DICTATOR_SW sapp_global_val->config.mem.dictator_enable //#define sapp_runtime_log(log_level, format, args...) do{if(log_level>=ABBR_SAPP_LOG_LEVEL){MESA_handle_runtime_log(ABBR_SAPP_LOG_HANDLE, log_level, "sapp", format, ##args);}}while(0) diff --git a/include/private/sapp_global_val.h b/include/private/sapp_global_val.h index bd7f53d..7255387 100644 --- a/include/private/sapp_global_val.h +++ b/include/private/sapp_global_val.h @@ -48,10 +48,6 @@ typedef struct{ long bind_mask; /* bind_mask_array中的每个变量做为bit_index转成的整数值 */ }sapp_config_cpu_t; -typedef struct{ - int dictator_enable; -}sapp_config_mem_t; - typedef struct{ char instance_name[NAME_MAX]; @@ -371,7 +367,6 @@ typedef struct{ typedef struct{ sapp_config_cpu_t cpu; - sapp_config_mem_t mem; sapp_config_tools_t tools; sapp_config_system_t system; sapp_config_stream_t stream; diff --git a/include/private/sapp_mem.h b/include/private/sapp_mem.h index 380d547..d68a0ac 100644 --- a/include/private/sapp_mem.h +++ b/include/private/sapp_mem.h @@ -69,8 +69,6 @@ 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 -extern int g_sapp_mem_use_dictator; - #ifdef __cplusplus } #endif diff --git a/include/private/sapp_private_api.h b/include/private/sapp_private_api.h index f23980f..cb65cb6 100644 --- a/include/private/sapp_private_api.h +++ b/include/private/sapp_private_api.h @@ -1,7 +1,6 @@ #ifndef _SAPP_PRIVATE_API_H_ #define _SAPP_PRIVATE_API_H_ 1 -#include "private/dictator.h" #include "private/compat.h" #include "private/deal_ipv4.h" #include "private/deal_ipv6.h" diff --git a/include/support/dictator.h b/include/support/dictator.h deleted file mode 100644 index 5a95132..0000000 --- a/include/support/dictator.h +++ /dev/null @@ -1,30 +0,0 @@ -/* DICATATOR Memory Manager -* Version 20141115 -* zhengchao@iie.ac.cn -*/ -#ifndef _DICTATOR2_H_ -#define _DICTATOR2_H_ - -#ifdef __cplusplus -extern "C"{ -#endif - -void *__wrap_malloc(size_t size); -void __wrap_free(void *p); -void *__wrap_realloc(void *ptr, size_t size); -void *__wrap_calloc(size_t nmemb, size_t size); - -void *__dictator_malloc(int t_seq,size_t size); -void __dictator_free(int t_seq,void*p); -void *__dictator_realloc(int t_seq,void *ptr, size_t size); -void *__dictator_calloc(int t_seq,size_t nmemb, size_t size); - -void *malloc(size_t size); -void *calloc(size_t nmemb, size_t size); -void free(void *p); - -#ifdef __cplusplus -} -#endif// end extern "C" - -#endif -- cgit v1.2.3