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

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -