Autor Beitrag
GuaAck
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 378
Erhaltene Danke: 32

Windows 8.1
Delphi 10.4 Comm. Edition
BeitragVerfasst: Mo 16.01.12 23:17 
Hallo,

1) Ich habe einen Algorithmus, der umso schnelle läuft, je mehr vorangegengene Ergebnisse er sich merken kann, sofern Windows nicht den voirtuellen Speicher auf der Festplatte (bzw. SSD) benutzen muss. Wie kann ich im System abfragen, wie groß der physikalische Speicher ist, um am besten auch, was davon gerade noch frei ist?

2) Der Algorithmus lässt sich parallelisieren, wobei die Effizienz des Algorithmus aber abnimmt, was durch die Nutzung mehrerer Cores aber mehr als aufgewogen wird. Bei einer 4-Core-CPU sehe ich deshalb 4 parallele Threads als optimal an. Aber wie kann man die Anzahl der Cores abfragen?

Zu beiden Fragen habe ich per Google gesucht, aber wohl irgendwie nicht die richtigen Begriffe eingegeben.

Hat jemand einen Tipp, wo man was findet?

Gruß GuaAck
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19326
Erhaltene Danke: 1749

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mo 16.01.12 23:31 
1. GlobalMemoryStatusEx --> ullTotalPhys / ullAvailPhys:
msdn.microsoft.com/e...366589(v=vs.85).aspx
2. GetNativeSystemInfo --> dwNumberOfProcessors:
msdn.microsoft.com/e...724340(v=vs.85).aspx
3. Eine Frage pro Thread...
hathor
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Di 17.01.12 12:47 
GlobalMemoryStatusEx:

Bei WIN 7 64Bit, 8 GB RAM ist die Anzeige falsch: 3.99 GB!
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Di 17.01.12 13:11 
Moin!

Auch immer wieder gerne empfohlen: Suche in: Delphi-Forum, Delphi-Library WMI :lupe: :think:

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19326
Erhaltene Danke: 1749

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Di 17.01.12 15:31 
user profile iconhathor hat folgendes geschrieben Zum zitierten Posting springen:
GlobalMemoryStatusEx:

Bei WIN 7 64Bit, 8 GB RAM ist die Anzeige falsch: 3.99 GB!
Dann rufst du es falsch auf. :nixweiss:
Falsche Ergebnisse darf nur die Version ohne Ex liefern.

Für diesen Beitrag haben gedankt: BenBE
GuaAck Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 378
Erhaltene Danke: 32

Windows 8.1
Delphi 10.4 Comm. Edition
BeitragVerfasst: Mi 18.01.12 23:39 
Danke allen, die beiden Funktionen machen ganau das, was ich brauche.

Gruß GuaAck