Bonjour,
Je souhaiterais savoir s'il existe une fonction C++ (sachant que je travaille sous windows xp) permettant d'afficher l'espace mémoire occupé par mon application (et uniquement mon application).
J'ai vu qu'il existait un certain nombre de fonctions capable d'évaluer l'espace mémoire total occupé par l'OS et l'ensemble de ses applications, mais rien en ce qui concerne le détail de chaque processus...
Dans mes recherches, je me suis arrêter aux structures :
- Win32_PerfFormattedData_PerfProc_JobObjectDetails
Win32_PerfFormattedData_PerfProc_JobObjectDetails.PoolNonpagedBytes
Data type: uint32
Access type: Read-only
Qualifiers: CookingType("PERF_COUNTER_RAWCOUNT" ), Counter("PoolNonpagedBytes" ), PerfTimeStamp("Timestamp_PerfTime" ), PerfTimeFreq("Frequency_PerfTime" )
Number of bytes in the nonpaged pool, an area of system memory (physical memory used by the operating system) for objects that cannot be written to disk, but must remain in physical memory as long as they are allocated. The PoolNonpagedBytes property in Win32_PerfFormattedData_PerfOS_Memory is calculated differently than the PoolPagedBytes property in Win32_PerfFormattedData_PerfProc_Process, so it might not equal the total of PoolPagedBytes for all instances of Win32_PerfFormattedData_PerfProc_Process. This property displays the last observed value only; it is not an average.
- Win32_PerfFormattedData_PerfOS_Memory
Win32_PerfFormattedData_PerfOS_Memory.PoolNonpagedBytes
Data type: uint64
Access type: Read-only
Qualifiers: CookingType("PERF_COUNTER_LARGE_RAWCOUNT" ), Counter("PoolNonpagedBytes" ), PerfTimeStamp("Timestamp_PerfTime" ), PerfTimeFreq("Frequency_PerfTime" )
Number of bytes in the nonpaged pool, an area of system memory (physical memory used by the operating system) for objects that cannot be written to disk, but must remain in physical memory as long as they are allocated. Memory: Pool Nonpaged Bytes is calculated differently than Process: Pool Nonpaged Bytes, so it might not equal Process: Pool Nonpaged Bytes: _Total. This property displays the last observed value only; it is not an average.
(trouvés dans la doc MSDN), mais je ne sais pas comment les manipuler :-/
Je vous remercie d'avance pour le éléments que vous pourrez m'apporter,
Cordialement,
Prophet-pro
Message édité par prophet-pro le 22-12-2006 à 10:58:26