<?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[GlobalAlloc: Daten im Ram halten?]]></title><description><![CDATA[<p>Ist es irgendwie möglich (unter Vista) einen Speicher zu reservieren, der nicht auf die Festplatte geswappt wird, sondern immer im RAM gehalten wird - mit GlobalAlloc scheint das nicht zu funktionieren</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/211090/globalalloc-daten-im-ram-halten</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Apr 2026 05:24:31 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/211090.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 18 Apr 2008 15:14:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to GlobalAlloc: Daten im Ram halten? on Fri, 18 Apr 2008 15:14:12 GMT]]></title><description><![CDATA[<p>Ist es irgendwie möglich (unter Vista) einen Speicher zu reservieren, der nicht auf die Festplatte geswappt wird, sondern immer im RAM gehalten wird - mit GlobalAlloc scheint das nicht zu funktionieren</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1494260</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1494260</guid><dc:creator><![CDATA[Vertexwahn]]></dc:creator><pubDate>Fri, 18 Apr 2008 15:14:12 GMT</pubDate></item><item><title><![CDATA[Reply to GlobalAlloc: Daten im Ram halten? on Fri, 18 Apr 2008 15:28:47 GMT]]></title><description><![CDATA[<p>nö</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1494266</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1494266</guid><dc:creator><![CDATA[rofler]]></dc:creator><pubDate>Fri, 18 Apr 2008 15:28:47 GMT</pubDate></item><item><title><![CDATA[Reply to GlobalAlloc: Daten im Ram halten? on Fri, 18 Apr 2008 15:31:50 GMT]]></title><description><![CDATA[<p>wie macht es dann diese Memtest Programm hier:<br />
<a href="http://hcidesign.com/memtest/download.html" rel="nofollow">http://hcidesign.com/memtest/download.html</a><br />
???</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1494269</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1494269</guid><dc:creator><![CDATA[Vertexwahn]]></dc:creator><pubDate>Fri, 18 Apr 2008 15:31:50 GMT</pubDate></item><item><title><![CDATA[Reply to GlobalAlloc: Daten im Ram halten? on Fri, 18 Apr 2008 15:35:27 GMT]]></title><description><![CDATA[<p>VitualLock</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1494274</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1494274</guid><dc:creator><![CDATA[yes!!!!]]></dc:creator><pubDate>Fri, 18 Apr 2008 15:35:27 GMT</pubDate></item><item><title><![CDATA[Reply to GlobalAlloc: Daten im Ram halten? on Fri, 18 Apr 2008 18:18:36 GMT]]></title><description><![CDATA[<p>Vertexwahn schrieb:</p>
<blockquote>
<p>wie macht es dann diese Memtest Programm hier:<br />
<a href="http://hcidesign.com/memtest/download.html" rel="nofollow">http://hcidesign.com/memtest/download.html</a><br />
???</p>
</blockquote>
<p>Das Programm reserviert Speicher und <em>hofft</em>, daß der nicht auf die Festplatte geswappt wird.<br />
Wenn danach beim stundenlangen Lesen und Schreiben ein Fehler auftritt, dann kann es ja nur am RAM liegen, oder? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1494348</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1494348</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Fri, 18 Apr 2008 18:18:36 GMT</pubDate></item><item><title><![CDATA[Reply to GlobalAlloc: Daten im Ram halten? on Mon, 28 Apr 2008 18:57:44 GMT]]></title><description><![CDATA[<p>Speicher kann man mit der Funktion malloc() reservieren. Dies steht auch im Petzold, Seite 1385.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1499976</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1499976</guid><dc:creator><![CDATA[bernibutt]]></dc:creator><pubDate>Mon, 28 Apr 2008 18:57:44 GMT</pubDate></item><item><title><![CDATA[Reply to GlobalAlloc: Daten im Ram halten? on Mon, 28 Apr 2008 20:30:15 GMT]]></title><description><![CDATA[<p>bernibutt schrieb:</p>
<blockquote>
<p>Speicher kann man mit der Funktion malloc() reservieren. Dies steht auch im Petzold, Seite 1385.</p>
</blockquote>
<p>erst lesen, dann schreiben <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1500053</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1500053</guid><dc:creator><![CDATA[Vertexwahn]]></dc:creator><pubDate>Mon, 28 Apr 2008 20:30:15 GMT</pubDate></item><item><title><![CDATA[Reply to GlobalAlloc: Daten im Ram halten? on Wed, 30 Apr 2008 11:22:08 GMT]]></title><description><![CDATA[<p>Hab jetzt mal versucht ein Demo Porgramm zu schreiben - funktioniert leider noch nicht - falls jemand Lust hat mal sowas zu machen - hier grob die Richtung wei es in etwa gehen könnte:</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &lt;stdio.h&gt;
#include &lt;iostream&gt;
using namespace std;

void main()
{

	int size = 1024 * 1024;
         // Working Size muss erhöht werden damit der Prozess mehr Speicher im RAM halten kann
	SetProcessWorkingSetSize(GetCurrentProcess(), 204800, 204800 + size  );
	void* buf = VirtualAlloc(NULL, size, MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE);

	if(DWORD error = GetLastError())
	{
		cout&lt;&lt;&quot;Error: &quot;&lt;&lt;error&lt;&lt;endl;
	}

	if(!VirtualLock(buf, size))
	{
		cout&lt;&lt;&quot;VitualLook failed.&quot;&lt;&lt;endl;

		cout&lt;&lt;&quot;ErrorNumber: &quot;&lt;&lt;GetLastError()&lt;&lt;endl;

	}

	system(&quot;pause&quot;);

	VirtualUnlock(buf,size);

	VirtualFree(buf, size, 0);

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1501120</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1501120</guid><dc:creator><![CDATA[Vertexwahn]]></dc:creator><pubDate>Wed, 30 Apr 2008 11:22:08 GMT</pubDate></item><item><title><![CDATA[Reply to GlobalAlloc: Daten im Ram halten? on Wed, 30 Apr 2008 11:23:44 GMT]]></title><description><![CDATA[<p>WAS geht denn nicht, und WAS für eine Fehlermeldung kommt?<br />
Bist Du (echter) Admin?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1501121</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1501121</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Wed, 30 Apr 2008 11:23:44 GMT</pubDate></item><item><title><![CDATA[Reply to GlobalAlloc: Daten im Ram halten? on Wed, 30 Apr 2008 11:31:49 GMT]]></title><description><![CDATA[<p>Ausgabe:</p>
<pre><code>VitualLook failed.
ErrorNumber: 1453
</code></pre>
<p>MSDN:</p>
<blockquote>
<p>ERROR_WORKING_SET_QUOTA<br />
1453<br />
Insufficient quota to complete the requested service.</p>
</blockquote>
<p>mmh...</p>
<p>EDIT: ich führ die Anwendung mit Admin Rechten aus</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1501122</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1501122</guid><dc:creator><![CDATA[Vertexwahn]]></dc:creator><pubDate>Wed, 30 Apr 2008 11:31:49 GMT</pubDate></item><item><title><![CDATA[Reply to GlobalAlloc: Daten im Ram halten? on Wed, 30 Apr 2008 11:56:05 GMT]]></title><description><![CDATA[<p>Hab jetzt noch eine Fehlerausgabe hinzugefügt:</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &lt;stdio.h&gt;
#include &lt;iostream&gt;
#include &lt;string&gt;
using namespace std;

void ReportError(DWORD i_dwErrorCode)
{
	LPVOID lpMsgBuf;
	FormatMessage( 
		FORMAT_MESSAGE_ALLOCATE_BUFFER | 
		FORMAT_MESSAGE_FROM_SYSTEM | 
		FORMAT_MESSAGE_IGNORE_INSERTS,
		NULL,
		GetLastError(),
		MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
		(LPTSTR) &amp;lpMsgBuf,
		0,
		NULL 
		);
	// Display the string.
	wcout&lt;&lt;(LPCWSTR)lpMsgBuf&lt;&lt;endl;
	cout&lt;&lt;&quot;ErrorNumber: &quot;&lt;&lt;i_dwErrorCode&lt;&lt;endl;
	//MessageBox( NULL, (LPCWSTR)lpMsgBuf, L&quot;Error&quot;, MB_OK | MB_ICONINFORMATION );
	// Free the buffer.
	LocalFree( lpMsgBuf );
}

void main()
{
	int size = 1024 * 1024;
	SetProcessWorkingSetSize(GetCurrentProcess(), 204800, 204800 + size  );
	void* buf = VirtualAlloc(NULL, size, MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE);

	if(DWORD error = GetLastError())
	{
		ReportError(GetLastError());
	}

	if(!VirtualLock(buf, size))
	{
		ReportError(GetLastError());
	}

	system(&quot;pause&quot;);

	VirtualUnlock(buf,size);

	VirtualFree(buf, size, 0);
}
</code></pre>
<p>Lustige Fehlermeldung:</p>
<blockquote>
<p>Nicht gen³gend Quoten, um den angeforderten Dienst auszuf³hren.</p>
<p>ErrorNumber: 1453</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1501139</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1501139</guid><dc:creator><![CDATA[Vertexwahn]]></dc:creator><pubDate>Wed, 30 Apr 2008 11:56:05 GMT</pubDate></item><item><title><![CDATA[Reply to GlobalAlloc: Daten im Ram halten? on Wed, 30 Apr 2008 12:21:31 GMT]]></title><description><![CDATA[<p>Also, der Fehler ist:<br />
ERROR_PAGED_SYSTEM_RESOURCES</p>
<p>Was für ein OS?</p>
<p>Warum übergibst Du &quot;MEM_RESERVE&quot;?</p>
<p>Lass man das &quot;SetProcessWorkingSetSize&quot; weg...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1501157</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1501157</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Wed, 30 Apr 2008 12:21:31 GMT</pubDate></item><item><title><![CDATA[Reply to GlobalAlloc: Daten im Ram halten? on Wed, 30 Apr 2008 13:55:44 GMT]]></title><description><![CDATA[<p>Nur mal am Rande:<br />
<a href="http://blog.m-ri.de/index.php/2008/01/05/die-unsitte-aus-performancegruenden-virtuallock-zu-verwenden/" rel="nofollow">http://blog.m-ri.de/index.php/2008/01/05/die-unsitte-aus-performancegruenden-virtuallock-zu-verwenden/</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1501219</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1501219</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Wed, 30 Apr 2008 13:55:44 GMT</pubDate></item></channel></rss>