Autor Beitrag
Flitzs
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 123
Erhaltene Danke: 7

Win7 x64/86 WinServer 2008 R2 x64
C#/C++/C VS2010
BeitragVerfasst: Fr 02.01.09 22:56 
Hallo,
ich hab eine Frage, wie ermittlne ich den freien RAM der Maschine auf der mein Programm läuft?

mfg Flitzs
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19339
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Fr 02.01.09 22:59 
Flitzs Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 123
Erhaltene Danke: 7

Win7 x64/86 WinServer 2008 R2 x64
C#/C++/C VS2010
BeitragVerfasst: Fr 02.01.09 23:39 
Hey,
danke für deine Antwort.

Ja ich hatte beide Seiten schon, allerdings liefert mir

ausblenden C#-Quelltext
1:
2:
3:
4:
PerformanceCounter ramCounter;
ramCounter = new PerformanceCounter("Memory""Available MBytes"); 
Console.WriteLine(ramCounter.NextValue());
Console.ReadLine();


leicht andere Werte (so ca. 50MB) als die die ich von anderen Monitor Tools (z.B. Taskmanager usw) bekomme.

mfg Flitzs
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19339
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Fr 02.01.09 23:43 
Das kann ich nicht reproduzieren. :nixweiss:
Bei mir wird exakt der selbe Wert angezeigt.
Flitzs Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 123
Erhaltene Danke: 7

Win7 x64/86 WinServer 2008 R2 x64
C#/C++/C VS2010
BeitragVerfasst: Fr 02.01.09 23:51 
Hey,
naja ich denke mal das wird schon passen ;)

mfg Flitzs
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19339
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Fr 02.01.09 23:57 
Wobei mir gerade einfällt:
Liegt die Abweichung vielleicht an der Umrechnung der Mebibyte? Wenn das Programm z.B. anzeigt 1500 MiB, dann wären das ja 1573 MB bzw. 1572864000 Byte. ;-)
Denn der Taskmanager zeigt ja KiB an, nicht MiB. Bei 1500 MiB würden dort also 1536000 (KiB) stehen.
Flitzs Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 123
Erhaltene Danke: 7

Win7 x64/86 WinServer 2008 R2 x64
C#/C++/C VS2010
BeitragVerfasst: Sa 03.01.09 00:51 
Hey,

jo wird wahrscheindlich daran liegen^^

mfg Flitzs