Why free() doesn't really frees memory?

前端 未结 4 2232
情歌与酒
情歌与酒 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:18

    When the system memory will be actually released depends on the OS.

    Foe example in Windows, even if you close a program, the memory is not released at the same time. It is made in order to reuse it on the next program start.

提交回复
热议问题