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

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -