Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Pushing the Limits: Virtual Memory

20 Nov 2008   #1
Bare Foot Kid
Microsoft MVP

W 7 64-bit Ultimate
 
 
Pushing the Limits: Virtual Memory

Pushing the Limits of Windows: Virtual Memory.

In my first post; I discussed physical memory limits, including the limits imposed by licensing, implementation, and driver compatibility. This time Iím turning my attention to another fundamental resource, virtual memory. Virtual memory separates a programís view of memory from the systemís physical memory, so an operating system decides when and if to store the programís code and data in physical memory and when to store it in a file. The major advantage of virtual memory is that it allows more processes to execute concurrently than might otherwise fit in physical memory.

While virtual memory has limits that are related to physical memory limits, virtual memory has limits that derive from different sources and that are different depending on the consumer. For example, there are virtual memory limits that apply to individual processes that run applications, the operating system, and for the system as a whole. It's important to remember as you read this that virtual memory, as the name implies, has no direct connection with physical memory. Windows assigning the file cache a certain amount of virtual memory does not dictate how much file data it actually caches in physical memory; it can be any amount from none to more than the amount that's addressable via virtual memory.

Process Address Spaces

Each process has its own virtual memory, called an address space, into which it maps the code that it executes and the data that the code references and manipulates. A 32-bit process uses 32-bit virtual memory address pointers, which creates an absolute upper limit of 4GB (2^32) for the amount of virtual memory that a 32-bit process can address. However, so that the operating system can reference its own code and data and the code and data of the currently-executing process without changing address spaces, the operating system makes its virtual memory visible in the address space of every process. By default, 32-bit versions of Windows split the process address space evenly between the system and the active process, creating a limit of 2GB for each.

Applications might use Heap APIs, the .NET garbage collector, or the C runtime malloc library to allocate virtual memory, but under the hood all of these rely on the VirtualAlloc API. When an application runs out of address space then VirtualAlloc, and therefore the memory managers layered on top of it, return errors (represented by a NULL address). The Testlimit utility, which I wrote for the the fourth edition of Windows Internals to demonstrate various Windows limits, calls VirtualAlloc repeatedly until it gets an error when you specify the Ėr switch. Thus, when you run the 32-bit version of Testlimit on 32-bit Windows, it will consume the entire 2GB of its address space.

Read more at the source.


Later Ted


My System SpecsSystem Spec
.
20 Nov 2008   #2
natri23

Windows 7 build 6956
 
 

I have 2GB RAM and have never used it up before. Even when running Windows 7 with as much programs as I can use, it's only take about 1GB.
So my question is should I disable the Virtual Memory Function to improve performance?
My System SpecsSystem Spec
21 Nov 2008   #3
Bare Foot Kid
Microsoft MVP

W 7 64-bit Ultimate
 
 

Hello natri23.

If it ain't broke don't fix it!...

Seriously though think about this: If it didn't get used and is necessary why would they go to so much trouble to develop it and add it to the OS at all?

You disabling it would hinder performance.










Later Ted
My System SpecsSystem Spec
.

21 Nov 2008   #4
Barman58

Windows 10 Pro x64 x2 Windows 10 Enterprise x64, Ubuntu
 
 

Hi Natri23

I would advise that you follow Ted's good advice, as both the OS and applications written for it, expect the virtual memory to be present.

I know users on vista have had problems after disabling it. Obviously Seven may be different but unless you are seriously short of disk space - I'd leave it as it is
My System SpecsSystem Spec
21 Nov 2008   #5
natri23

Windows 7 build 6956
 
 

Thank you guys, I just think simply that RAM has a better speed than my hard disk's one
And one more question. I know that it's better to leave the pagefile at the first partition of the hard disk but my Windows 7 is on the third partition. So should I still leave the pagefile at the first partition or better the same one with my system
My System SpecsSystem Spec
21 Nov 2008   #6
Bare Foot Kid
Microsoft MVP

W 7 64-bit Ultimate
 
 

Quote   Quote: Originally Posted by Bare Foot Kid View Post
Hello natri23.

If it ain't broke don't fix it!...














Later Ted
...
My System SpecsSystem Spec
16 Jan 2009   #7
shadowminx69

Windows 7 Build 7000
 
 

I am using the CPU Meter Gadget and my Memory Button is Constantly around 50-70% I have my Virtual Memory Set on all drives I have to use whatever. My Question is... is my computer using any of the virtual memory? Why is my gadget always showing high memory usage. Don't get me wrong the computer Runs very smoothly. just curious why. and Not sure I understand when Virtual memory kicks in or not. any info?
My System SpecsSystem Spec
17 Jan 2009   #8
Bare Foot Kid
Microsoft MVP

W 7 64-bit Ultimate
 
 

Hello shadowminx69, welcome to Se7en Forums!


How much actual RAM do you have onboard; are you using a 32-bit or 64-bit Windows 7?















Later Ted
My System SpecsSystem Spec
17 Jan 2009   #9
shadowminx69

Windows 7 Build 7000
 
 

I have 1gb ram and I am running 32-bit.
My System SpecsSystem Spec
17 Jan 2009   #10
Bare Foot Kid
Microsoft MVP

W 7 64-bit Ultimate
 
 

Quote   Quote: Originally Posted by shadowminx69 View Post
I have 1gb ram and I am running 32-bit.

Hello again.


If your motherboard will support it, I would add at least 1GB more of RAM; 32-bit really does way better with 2GB; 4GB would be way better. When I had 4GB with 32-bit Vista, the system idled at 25 to 30% RAM usage.

Yes, your system is using the swap file; leave it at "System Managed".




Later Ted
My System SpecsSystem Spec
Reply

 Pushing the Limits: Virtual Memory




Thread Tools




Similar help and support threads
Thread Forum
Virtual Memory
solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved
Performance & Maintenance
windows 7 memory limits? speed and capacity?
hey everyone.. im curious if anyone has the numbers for windows 7 memory limits, im using 64 bit ultimate, and i know capacity its capable of some number ive never met a motherboard that could even handle.. but, what about the speed/frequency of the memory? i hear theres a limit somewhere, and...
Hardware & Devices
Are USB Cable Length Limits hard limits?
I'm trying to get a longer cable for my digital SLR camera, so I can live preview / shoot from the computer. The camera has about a 3 foot cable with a special USB end. I was just going to order a 15 foot usb extension cable, but this would put me at a total of about 18 feet. Will this extra 2...
Hardware & Devices
Win 7 32-bit Memory Limits?
I'm running Win 7 32-bit with 2 GB memory in my system, considering upgrading to 4 GB. I've read that the 32-bit ver will only utilize 2.5 to 3.6 GB memory maximum. If my system will only utilize 2.5 GB memory, an upgrade wouldn't really be worth it, but if it will utilize 3.6 GB, I think that...
Hardware & Devices
Pushing the Limits: Physical Memory
Pushing the Limits of Windows: Physical Memory. Physical Memory One of the most fundamental resources on a computer is physical memory. Windows' memory manager is responsible with populating memory with the code and data of active processes, device drivers, and the operating system itself....
News


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd

All times are GMT -5. The time now is 20:55.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App