1# HiDebug_MallocDispatch 2 3<!--Kit: Performance Analysis Kit--> 4<!--Subsystem: HiviewDFX--> 5<!--Owner: @hello_harmony; @yu_haoqiaida--> 6<!--SE: @kutcherzhou1--> 7<!--TSE: @gcw_KuLfPSbe--> 8 9## Overview 10 11Defines the struct types of the replaceable/restorable **HiDebug_MallocDispatch** table of the application process. 12 13**Since**: 20 14 15**Related module**: [HiDebug](capi-hidebug.md) 16 17**Header file**: [hidebug_type.h](capi-hidebug-type-h.md) 18 19## Summary 20 21### Member Function 22 23| Name| Description| 24| -- | -- | 25| [void* (\*malloc)(size_t)](#malloc) | Pointer to the custom **malloc** function.| 26| [void* (\*calloc)(size_t, size_t)](#calloc) | Pointer to the custom **calloc** function.| 27| [void* (\*realloc)(void*, size_t)](#realloc) | Pointer to the custom **realloc** function.| 28| [void (\*free)(void*)](#free) | Pointer to the custom **free** function.| 29| [void* (\*mmap)(void*, size_t, int, int, int, off_t)](#mmap) | Pointer to the custom **mmap** function.| 30| [int (\*munmap)(void*, size_t)](#munmap) | Pointer to the custom **munmap** function.| 31 32## Member Function Description 33 34### malloc() 35 36``` 37void* (*malloc)(size_t) 38``` 39 40**Description** 41 42Pointer to the custom **malloc** function. 43 44### calloc() 45 46``` 47void* (*calloc)(size_t, size_t) 48``` 49 50**Description** 51 52Pointer to the custom **calloc** function. 53 54### realloc() 55 56``` 57void* (*realloc)(void*, size_t) 58``` 59 60**Description** 61 62Pointer to the custom **realloc** function. 63 64### free() 65 66``` 67void (*free)(void*) 68``` 69 70**Description** 71 72Pointer to the custom **free** function. 73 74### mmap() 75 76``` 77void* (*mmap)(void*, size_t, int, int, int, off_t) 78``` 79 80**Description** 81 82Pointer to the custom **mmap** function. 83 84### munmap() 85 86``` 87int (*munmap)(void*, size_t) 88``` 89 90**Description** 91 92Pointer to the custom **munmap** function. 93