在调用delete释放内存后,调用如何命令即可
int res = malloc_trim(0);
if (1 == res) {
std::cout << "memory cleaned__" << std::endl;
} else {
std::cout << "memory not cleaned__" << std::endl;
}
需要依赖头文件
#include <malloc.h>
在调用delete释放内存后,调用如何命令即可
int res = malloc_trim(0);
if (1 == res) {
std::cout << "memory cleaned__" << std::endl;
} else {
std::cout << "memory not cleaned__" << std::endl;
}
需要依赖头文件
#include <malloc.h>