PDA

Click to See Complete Forum and Search --> : Swapping Unused Memory Blocks To Disk


Rooksie
Aug 29th, 2000, 06:01 AM
I've noticed in Win2000 when applications are minimized the footprint of the application in memory drops dramitically.
The only reason I can think of is that knowing that the visual parts of the app are not being using Windows cleverly offloads them to the swap file.

So my question is, does anyone know of a way to swap parts of thier applications to VM, therefore creating the above effect without minimizing the window first.

I know the old create a huge block technique but I want a more gracefull way that won't affect the whole system.

Crazy D
Aug 29th, 2000, 09:16 AM
It's not the programs who do so, it's windooz which has some improved memory handling in w2k.

What you could do yourself though, is, for instance, save huge arrays to a textfile when you know you don't need them for a while, and redim them to 0, or huge strings, stuff like that. afaik there's no "SwapMemoryToDisc" API...

Rooksie
Aug 29th, 2000, 09:32 AM
I am aware that is the OS that is doing the swapping, as I stated in my first post, so if windows is doing it, there must be a way. Its just not widely known about.

There must be someone with knowledge of such an undocumented feature.

Crazy D
Aug 30th, 2000, 02:13 AM
I don't think there's an undocumented function for that. Memory management is one of the basic things an OS must do, and, I think a 2nd thing an OS must do is not to let programs themselves do so. That way the need of memory handling of the OS is gone if apps do it themselves.

Rooksie
Aug 30th, 2000, 03:46 AM
call me pedantic, but i'm still not buying it, this user is still waiting for an answer.

Crazy D
Aug 30th, 2000, 07:24 AM
I hope I'm wrong cus it would be kewl, "Call SwapMemory" would look kewl ;-), but don't count on it too much that's all I'm saying.

hehe and i won't call you pedantic until I know what it means ;-)

Rooksie
Aug 30th, 2000, 07:30 AM
hehe, well I'd have to look it up in the dictionary for a definition myself :)

I'm gonna petition microsoft to release the calls used to perform such memory tricks.

Dunno why I'm bothering as anything I could swap out, would be swapped anyway by the OS when things got full up at the Inn.

Must be just for the coolness factor afterall.