Pat, this thread has nothing to do with needing more than 2GB of memory to run an application. Rather, I think it has to do with how Windows allocates memory, and thus what the root causes are for out-of-memory/resource errors.
Avihai, in 32-bit Windows, each application has a 4GB addressable memory space. By default, Windows reserves 2GB of that space for its use (which I believe is shared among all processes) and 2GB for the application's use (each app gets its own 2GB area). The /3GB boot option (which Vlado mentioned) changes this to 1GB for Windows and 3GB for each app.
The addressable memory allocated to Windows (2GB normally, 1GB if the /3GB boot option is used) is where Windows places all of the objects it uses to run the computer. Things like file info, thread info, objects for windows and other GUI artifacts. And like I said, I believe this space is shared among all apps. So every app that creates windows or threads or opens files reduces the amount on memory available for other applications. Eventually, there is little or no more room in this memory. Then when a Java app comes along it runs out of resources - likely causes being nor enough room for opening file handles to load large numbers of JAR files or nor enough room for allocating the myriad of threads that a typically Java-based application server will run (in my experience, it has always been the threads that cause the out of resources problem).
So what can you do? A few things. First, if you are booting with /3GB, don't. That will give the OS another 1GB to play with. If you are not booting with /3GB, then all you can do is determine which apps that you have running already are using up the system resources. For this you will need a tool like Process Explorer or Process Monitor from sysinternals. Those tools can tell you what resources are in use. Even Task Manager can be of use if you make several other columns on the Process tab available.
The other possibility is that you have set your app up to create a bunch of threads (like configuring
Tomcat to create hundreds of HTTP threads), in which case you need to reduce the number of threads.
[ August 05, 2008: Message edited by: Peter Johnson ]