c - Dynamic memory allocation using malloc() -
How is the memory allocated using malloc ()? Who assigns memory to OS or compiler? Once the memory is free using (), then can it be used by other processes?
4 memory areas in the OS HANP, stack, text and data. When you use malloc the OS map provides storage from the area. The compiler is not responsible for allocating this memory. When you use it free, the memory block comes back to the heap.
Comments
Post a Comment