<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Windows Total Memory Size]]></title><description><![CDATA[<p>Hallo,<br />
Ich benötige eine Methode um die Total Memory Size unter Windows zu bestimmen. Nach langem suchen bin ich auf folgendes CodeSnippet gestoßen.</p>
<pre><code class="language-cpp">#ifdef WIN32

MEMORYSTATUS ms;
GlobalMemoryStatus(&amp;ms);

//Debug 1024000L 1048576L
//printf(&quot;Total physical: %lu bytes (%luMB)\n&quot;, ms.dwTotalPhys, ms.dwTotalPhys / 1048576L);

return (ms.dwTotalPhys / 1048576L);
#endif
</code></pre>
<p>Das Problem bei dieser Funktion ist, dass mir Windows (wahrscheinlich durch irgend eine Memory-Limitation-Per-Prozess) nur 2047MB anzeigt, obwohl weitaus mehr memeory im System verfügbar ist.</p>
<p>Gibt es noch andere Wege an die <strong>wirkliche</strong> Total Memory Size heranzukommen?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/231528/windows-total-memory-size</link><generator>RSS for Node</generator><lastBuildDate>Fri, 25 Sep 2026 19:04:32 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/231528.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 12 Jan 2009 09:54:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Windows Total Memory Size on Mon, 12 Jan 2009 09:54:37 GMT]]></title><description><![CDATA[<p>Hallo,<br />
Ich benötige eine Methode um die Total Memory Size unter Windows zu bestimmen. Nach langem suchen bin ich auf folgendes CodeSnippet gestoßen.</p>
<pre><code class="language-cpp">#ifdef WIN32

MEMORYSTATUS ms;
GlobalMemoryStatus(&amp;ms);

//Debug 1024000L 1048576L
//printf(&quot;Total physical: %lu bytes (%luMB)\n&quot;, ms.dwTotalPhys, ms.dwTotalPhys / 1048576L);

return (ms.dwTotalPhys / 1048576L);
#endif
</code></pre>
<p>Das Problem bei dieser Funktion ist, dass mir Windows (wahrscheinlich durch irgend eine Memory-Limitation-Per-Prozess) nur 2047MB anzeigt, obwohl weitaus mehr memeory im System verfügbar ist.</p>
<p>Gibt es noch andere Wege an die <strong>wirkliche</strong> Total Memory Size heranzukommen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1643767</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1643767</guid><dc:creator><![CDATA[xquadrat]]></dc:creator><pubDate>Mon, 12 Jan 2009 09:54:37 GMT</pubDate></item><item><title><![CDATA[Reply to Windows Total Memory Size on Mon, 12 Jan 2009 09:58:55 GMT]]></title><description><![CDATA[<p>Du musst mit /LARGEADDRESSAWARE linken, dann gehts. Oder du verwendest GlobalMemoryStatusEx.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1643768</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1643768</guid><dc:creator><![CDATA[David_pb]]></dc:creator><pubDate>Mon, 12 Jan 2009 09:58:55 GMT</pubDate></item><item><title><![CDATA[Reply to Windows Total Memory Size on Mon, 12 Jan 2009 10:05:09 GMT]]></title><description><![CDATA[<p>hmm, wenn ich mit folgenden Optionen kompiliere, bekomme ich trozdem nur die 2047 MB angezeigt</p>
<p>gcc -IC:\Java\j2sdk1.4.2_17\include -IC:\Java\j2sdk1.4.2_17\include\win32 -shared -Wl,--add-stdcall-alias,--large-address-aware -o MemoryDetection.dll MemoryDetection.cpp</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1643775</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1643775</guid><dc:creator><![CDATA[xquadrat]]></dc:creator><pubDate>Mon, 12 Jan 2009 10:05:09 GMT</pubDate></item><item><title><![CDATA[Reply to Windows Total Memory Size on Mon, 12 Jan 2009 10:08:15 GMT]]></title><description><![CDATA[<p>Dann nimm GlobalMemoryStatusEx. Ich weiß nicht wie gcc das handhabt. Der Verweis bezog sich auf Visual C++.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1643778</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1643778</guid><dc:creator><![CDATA[David_pb]]></dc:creator><pubDate>Mon, 12 Jan 2009 10:08:15 GMT</pubDate></item><item><title><![CDATA[Reply to Windows Total Memory Size on Tue, 13 Jan 2009 19:01:18 GMT]]></title><description><![CDATA[<p>nach langem rumprobieren merke ich, dass ich wohl nicht um den visual c++ compiler herum komme.<br />
Habe nun visual studio 2005 aufgesetzt und mein JNI-Programm compiliert.<br />
Wenn ich die dll allerdings von java aus aufrufe erhalte ich immer wieder die fehlermeldung &quot;Can't find dependant libraries&quot;.</p>
<p>gibt es eine möglichkeit eine (von mir aus auch sehr große dll) zu erzeugen, die keine abhängigkeiten besitzt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1644818</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1644818</guid><dc:creator><![CDATA[xquadrat]]></dc:creator><pubDate>Tue, 13 Jan 2009 19:01:18 GMT</pubDate></item></channel></rss>