can a 32 bit process use more than 2GB?

Stainforth, Matthew (SD/DS) Matthew.Stainforth at gnb.ca
Wed Mar 17 13:41:50 UTC 2010


> My question now is, what happens if a process needs more memory. For
> example, I use vim to analize the log files of my application server.
> I have files larger than 4G, (almost 5GB). What does the kernel do in
> this case? swap?

If the application is 32 bit, 4GB is all the application can address, end of story.  An application trying to allocate more than that will get an error (ENOMEM).  If the app doesn't detect and handle the error, it will probably crash.

There are techniques that applications can use to deal with huge files such as loading smaller pieces that are needed into memory and caching out changes to a temp file.  However, I have no idea if vim works that way - you would need to check the documentation and/or give it a try yourself.




More information about the redhat-list mailing list