I admit it, in a time where everyone is screaming for more and more dedicated memory on the graphics card, the concern of this tutorial today is rather incomprehensible for many. However, certainly only at first glance. Because all of this solves a problem very elegantly, which one might face (admittedly) very rarely, but nevertheless sometimes and for which there is no practical solution right away, even in the area of the almost endless Google search. And since this afternoon still another hot dino waits for us, I fetched the article for this morning again from the depths of the archive. Waiting for Dino Lake with a slightly different morning reading….
Original article
It doesn’t matter if an older application strikes because the allocable or free memory exceeds the upper limit of what the program can handle (remember the limits of the 32-bit programs) or because you just want to test when the free memory might not be enough and what error images are triggered – I was now facing this problem myself and needed a workable solution that does not generate system or graphics card load and still blocks memory cleanly.
For me, the solution approach at the end was certainly simple, because I just wrote a small OpenCL program that does just that: allocate memory, so to speak block it and protect it for access by other programs. DirectX and memory management are also not simplistic when it comes to moving and offloading content contained in graphics card memory when the program in question is stumbling in the background. However, all this is (for reasons of liability) only part of my own tool collection and nothing for the download area. But the solution approach is simple in itself and so my thanks also go to my colleague Yannick Guerrini, who recommended to me as a replacement a common tool that can be used skilfully for these purposes.
Blocking and paralyzing – We only need two free tools
We can also skilfully do the allocation with memtestCL (download). This slightly older freeware tool from Stanford University is also available as source code on Github and it does exactly what we want. However, there is a limitation here that the default of the memory to be tested must be less than 4 GB. Here you can help yourself by simply starting two instances (or more) and sairating up a lot more memory. The command line parameters are simple and if you want, simply write a batch file (or several with different size specifications). If you have more than one graphics adapter in your computer (e.g. CPU with iGP), selects the desired graphics card.
The call is simple and the optional batch file is. For example, if you 2 GB, then you simply start it as memtestCL 2048 – it almost doesn’t get any easier. By default, 50 iterations are set, leaving enough time to stop the program with the second tool. For this we need the Process Explorer (download) of Sysinternals. You can just start it like that. How the individual steps now work, I will show you in a way.
Practical example: we block 4 GB with memtestCL
First, the initial situation: Except for a little window-gash, the graphics memory is almost empty.
But that is easy to change! Now let’s start memtestCL with the desired memory size and then the Process Explorer. There we have alphabetically descending the current processes listed (e.g. “Process” in the table header) and locate the entry to memtestCL.exe.
We select this line and then right click on the entry. A pop-up menu appears, where we select the function “suspend”.
Now the program is in fact in sleep mode and does not cause any processor load. However, the memory is securely blocked and is no longer available to the video card. Clever people can also test this with the afterburner overlay, where suddenly the memory allocation has increased by the previously selected amount.
But you can also easily view and check it from the Windows Task Manager resource display. The result is the same.
If you want to allocate and / or allocate memory from 4 GB, you will start a second instance with the additional memory size you want.
And again please do not forget the suspend mode (see above)!
The result is unique and can be checked directly in Task Manager. In this case, I had simply blocked 2 GB twice.
You will read about what I needed it for now. when it comes to graphics card testing for a certain new product. Let yourself be surprised!
13 Antworten
Kommentar
Lade neue Kommentare
Urgestein
Mitglied
Veteran
1
Mitglied
Veteran
Veteran
Urgestein
Urgestein
Mitglied
Mitglied
Veteran
Alle Kommentare lesen unter igor´sLAB Community →