问题描述
大家好,
有人可以解释一下为什么在free()操作之后任务管理器不直接更新内存使用情况吗?
我有以下循环:
MeassCollection = CreasteMeasurementCollection(); //基于CPtrArray
for(i = 1; i< = 8; i ++){
测量= CreateMeasObject();
Meas.size = 1024s//样本
//这在内部使用了malloc(pfSamples =(float *)malloc(Meas.Size * sizeof(float)));
for(j = 1; i< = 250; i ++){
MeasCloned = CreateMeasObject(Meas); //创建一个空的测量并复制样本
//这在内部使用了malloc(pfSamples =(float *)malloc(Meas.Size * sizeof(float)));
Meas.submeasurements.add(MeasCloned);
}
MeassCollection.Add(Meas);
}
如果我运行几次,任务管理器中的内存使用情况不会返回到初始应用程序启动状态吗?
如果我没有直接看到更新,这正常吗?它像一个用于以后分配目的的缓存系统吗?
你能解释一下吗?
提前非常感谢您.
最好的问候.
SuperMiQi
Hello Everyone,
Could somebody explaine me why the task manager does not directly update the memory usage after a free() operation?
I have the following loop:
MeassCollection = CreasteMeasurementCollection(); // based on CPtrArray
for (i = 1; i <= 8; i++) {
Meas = CreateMeasObject();
Meas.size = 1024s // samples
// this uses internally a malloc (pfSamples = (float*) malloc(Meas.Size * sizeof(float)));
for (j = 1; i <= 250; i++) {
MeasCloned = CreateMeasObject(Meas); // create an empty meas and copy the samples
// this uses internally a malloc (pfSamples = (float*) malloc(Meas.Size * sizeof(float)));
Meas.submeasurements.add (MeasCloned);
}
MeassCollection.Add(Meas);
}
If I run this several time the memory usage in the task manager does not return to the intial application startup state ?
Is it normal if I do not see the update directly ? Is it like a cache system for later allocation purposes?
Could you please explain ?
Thank you very much in advance.
Best regards.
SuperMiQi
推荐答案
这篇关于在执行free()操作后,任务管理器不会直接更新内存使用情况,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!