WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
dbg_hash_tab.h
浏览该文件的文档.
1
9#ifndef __DBG_HASH_TAB_H__
10#define __DBG_HASH_TAB_H__
11#ifdef _DEBUG_HEAP_MEM_MGR
12
13#include <stdint.h>
14#include "osal_list.h"
15
16#ifdef __cplusplus
17#if __cplusplus
18extern "C" {
19#endif
20#endif
21
22#define HEAP_HASH_SIZE 0x40 // 64
23
24typedef struct dbg_hash_data {
25 void *key;
26 uint32_t length;
27#ifdef __GNUC__
28 uint32_t master;
29#endif
30 struct osal_list_head list;
31} dbg_hash_data;
32
33typedef uint32_t (*hash_func)(const void *ptr, size_t tab_len);
34
35typedef struct dbg_hash_tab {
36 struct osal_list_head table[HEAP_HASH_SIZE];
37 uint32_t tab_len;
38 struct osal_list_head free_head;
39 hash_func hash_key_func;
40} dbg_hash_tab;
41
42/******************* func *******************/
43void hash_mem_add(dbg_hash_tab *hash_tab, void *ptr, uint32_t value, uint32_t master);
44uint32_t hash_mem_delete(dbg_hash_tab *hash_tab, void *ptr);
45
46#ifdef __cplusplus
47#if __cplusplus
48}
49#endif
50#endif
51#endif
52#endif
Definition osal_list.h:39