Why free() doesn't really frees memory?

前端 未结 4 2230
情歌与酒
情歌与酒 2020-12-01 22:45

i\'m doing some tests allocating and deallocating memory. This is the code i\'m using:

#include 
#include 

#define WAVE_SIZE          


        
4条回答
  •  时光说笑
    2020-12-01 23:20

    free() merely tells the allocator that your program no long needs this block. The allocator may cache it for further allocation, or it may return it to the system by change the brk pointer. It all depends on the implementation.

提交回复
热议问题