1. mem_init (): Memory heap initialization function. It mainly sets the starting address of the memory heap and initializes the idle list. It is called during LWIP initialization and has an internal interface.
2. Void * mem_malloc (mem_size_t size)
It is not the address of the memory block. If the memory is allocated, null is returned. The requested memory heap is a global variable.
3. * mem_calloc (mem_size_t count, mem_size_t size): It is a simple packaging of the mem_malloc () function. There are two entry parameters. Count is the size of each element,
Size is the total number of elements. The product of the two parameters is the size of the actual memory space to be allocated. Unlike mem_malloc (), it clears the dynamically allocated memory. So many
The user will choose to call mem_calloc (). This will definitely clear 0 and avoid calling memset (). The returned value is the same as that of mem_malloc.
4. Void mem_free (void * rmem): memory release function. rmem is the first address of the memory block to be released.
5. mem_realloc (void * rmem, mem_size_t newsize): re-allocate memory, pointer name = (data type *) realloc (name of the pointer to change the memory size, new size ).
6. Static void plug_holes (struct mem * MEm): Merge adjacent and unused memory blocks. Call in mem_free