32-bit windows and got out of virtual memory error?

 

Overview

got a 32-bit windows and think you are limited to 3-4GB of memory? do lots of concurrency like lots of cmd shells for development? there is a trick I learned which can increase the memory windows says it has available by using FIXED (not auto- or system-allocated) Virtual Memory on multiple logical drive letters.

I had a 32-bit windows and 32-bit processor (Pentium 4 HT). If you have a 64-bit processor, you don't have to go through all this, just crank virtual memory up to 16-32GB, click set, click OK a bunch of times, and restart. You can get better virtual memory performance by splitting and spreading these virtual memory partitions across multiple physical disks.

I could have more virtual memory if I wanted, as long as I have multiphe physical hard drives, or I can partition my 1st hard drive up into multiple pieces but that doesn't work as well.

Increasing VM beyond 4096MB on 32-bit windows

you want 1 primary parition which usually which has your OS and data, and 1 extended which you should resize (shrink), per physical disk, at best. use gparted ( gparted ) or your favorite disk management/partitioning utility to 1.resize, 2.create, and 3.format as NTFS blank partitions (avoid formatting anything with data in it please, that could hurt your windows installation or your data). the extended partition should fills the rest of the unpartitioned space. divide up the extended partition into logical drives(partitions) which fill up that extended partition.

format them as NTFS (FAT32 may work, but not sure if you can put virtual memory on it). make sure they have at least 5-7GB of space (I put in 7000MB). enough for the 4096MB (limit) and the filesystem. NTFS takes a some more space than the 4096MB.

when you set the virtual memory on that drive, set a fixed 4096 per partition (minimum and maximum).

  1. [windows-logo-flag-key]-[pause-break], advanced, performance, settings, advanced tab, virtual memory, change
  2. pick a drive, look at "Space available". if it's around 4096-7000MB, this should be one of the partitions you made.
  3. click Custom Size. change Initial size to 4096 (if you have a 64-bit machine, you can put in a larger size) and maximum size to 4096.
  4. set
  5. repeat step 2 until all the 4096-7000MB partitions are used up.
  6. OK
  7. OK
  8. OK
  9. restart, which may be a power icon (looks like merge of a 0 and 1) or shutdown and powerup.
  10. [windows-logo-flag-key]-R taskmgr [Enter]
  11. performance tab

. you should have a larger number now. enjoy.

the logical drive letters are drive letters like d:, e: f: g:, etc, so realize they can only go up to z:, don't forget to take into account your os recovery partition drive letter and cdrom drive letter, memory card reader, and any flash drives you have. it can reach up to Z: quickly.

this is for multitaskers like me who like to run LOTS of apps at once.

32-bit apps can only access 4GiB of RAM.

a 32-bit compiler can require more RAM than is available in address space for a given task for big compile tasks, (which are few in number) this would be something like compiling a language parser. so it might crash during a run, which can indicate it ran out of memory.

print this out and get a techie to help you out with this if you need help.

how the ram is currently used up

the 32-bit apps you run still can only address 4GiB of memory (even on a 64-bit box, minus video ram - you can use a 32-bit program to find out how much heap is available), but I can tell you from experience that for us folks still on 32-bit systems, part of that memory is used by background stuff like

  • printer software
  • antivirus
  • windows itself and its pieces, like services
  • web server, database engine, ftp server if you are running XAMPP or Moodle or Apache Lounge for a web server testbed
  • cmd shells
  • video card drivers and apps
  • motherboard drivers and apps
  • printer (if any) drivers and apps
  • notification area applications
  • startup applications