Introduction - If you have any usage issues, please Google them yourself
The memory management thought I use is the chain table management thought, and the memory allocation scheme is the best fit. Its main data structure is
Struct node
{
Char * p
Int memosize
Int flag
Struct node * next
}
This is the data structure of the node of a linked list, using it to manage memory allocation and recovery. P represents the first address of the allocated memory, and memosize represents the size of the allocated memory block, and the flag is a flag amount, indicating whether the memory block is occupied. Use 1 and 0 to indicate occupied and unoccupied. Next represents the first address of the next node.
Includes a memory management allocates memory mm_request (unsigned int) function, an initialization to manage memory mm_init () function, a free list sorting function to sort (), a free memory mm_release (void *) function and a judge whether memory occupied IsFree function (int).
Packet : 71477208neicun.rar filelist
neicun.c