Linux Process heap
A large area of the process's address space is called a "Heap". Its address space is in the process. data and. bss address growth direction to the range of the low address section in the dynamic library area
Heap can be considered as a large memory area of a process (physical memory has been allocated, but not all address spaces are allocated with physical memory, the size depends on the system type and version) is used to dynamically allocate memory space for programs in the process, by distributing a large amount of actual memory space to the operating system to glibc for management, the process can improve the efficiency of dynamic memory requests and releases when the program requests Dynamic Allocation of relatively small memory space, glibc is allocated from this large memory space. When a program needs to dynamically allocate a large memory space, it is implemented by the operating system through corresponding system calls. Because the heap features that the memory area can be dynamically applied for and released (the timing and size are not sure), there are usually several ways to organize and manage this large block of physical memory:
1) two-way linked list
2) bitmap
3) Object pool
Because of the dynamic usage of memory, Glibc has a poor performance compared with the stack. Glibc is the libc library released by GNU, that is, the C Runtime Library, that is, the runtime environment on which the C language depends, the C program (main function) has been loaded into the memory before it is run.