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:
- object hook, invoked at object created, deleted, taken and put etc.
- scheduler hook, invoked at thread switch and idle thread loop.
- memory hook, invoked when allocate or free memory block.
- timer hook, invoked when timer is timeout. 
◆ rt_malloc_sethook()
      
        
          | void rt_malloc_sethook | ( | void(*)(void **ptr, rt_size_t size) | hook | ) |  | 
      
 
This function will set a hook function, which will be invoked when a memory block is allocated from heap memory. 
- Parameters
- 
  
  
 
 
◆ rt_realloc_set_entry_hook()
      
        
          | void rt_realloc_set_entry_hook | ( | void(*)(void **ptr, rt_size_t size) | hook | ) |  | 
      
 
This function will set a hook function, which will be invoked when a memory block is allocated from heap memory. 
- Parameters
- 
  
  
 
 
◆ rt_realloc_set_exit_hook()
      
        
          | void rt_realloc_set_exit_hook | ( | void(*)(void **ptr, rt_size_t size) | hook | ) |  | 
      
 
This function will set a hook function, which will be invoked when a memory block is allocated from heap memory. 
- Parameters
- 
  
  
 
 
◆ rt_free_sethook()
      
        
          | void rt_free_sethook | ( | void(*)(void **ptr) | hook | ) |  | 
      
 
This function will set a hook function, which will be invoked when a memory block is released to heap memory. 
- Parameters
-