What could explain the difference in memory usage reported by FastMM or GetProcessMemoryInfo?

前提是你 提交于 2019-12-06 00:22:00
Lars Truijens

GetProcessMemoryInfo also reports memory that is not managed by FastMM, like memory that is allocated by the various non Delphi dlls you might call (like winapi).

Also FastMM can allocate more memory from Windows that your application actually uses for internal structures, fragmentation and pooling.

And as last, with GetProcessMemoryInfo you measuring the Workingset size. That is what part of the application's memory currenctly in RAM instead if in the page file. It includes more than just data structures and is definately not comparable to the total memory the application has allocated. PagefileUsage would be more comparable. Workingset size almost never is what you are looking for. See here for a better explanation.

So they both give different results because they both measure different things.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!