RT-Thread RTOS 1.2.0
An open source embedded real-time operating system
|
void | rt_malloc_sethook (void(*hook)(void **ptr, rt_size_t size)) |
void | rt_realloc_set_entry_hook (void(*hook)(void **ptr, rt_size_t size)) |
void | rt_realloc_set_exit_hook (void(*hook)(void **ptr, rt_size_t size)) |
void | rt_free_sethook (void(*hook)(void **ptr)) |
the hook function set in runtime
In order to trace and record RT-Thread activity in runtime, a hook mechanism is introduced.
The hooks are a series of routines, which are invoked in some special checkpoints. The hook routines include:
void rt_malloc_sethook | ( | void(* | hook )(void **ptr, rt_size_t size) | ) |
This function will set a hook function, which will be invoked when a memory block is allocated from heap memory.
hook | the hook function. |
在文件 kservice.c 第 602 行定义.
void rt_realloc_set_entry_hook | ( | void(* | hook )(void **ptr, rt_size_t size) | ) |
This function will set a hook function, which will be invoked when a memory block is allocated from heap memory.
hook | the hook function. |
在文件 kservice.c 第 613 行定义.
void rt_realloc_set_exit_hook | ( | void(* | hook )(void **ptr, rt_size_t size) | ) |
This function will set a hook function, which will be invoked when a memory block is allocated from heap memory.
hook | the hook function. |
在文件 kservice.c 第 624 行定义.
void rt_free_sethook | ( | void(* | hook )(void **ptr) | ) |
This function will set a hook function, which will be invoked when a memory block is released to heap memory.
hook | the hook function |
在文件 kservice.c 第 635 行定义.