[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: More than 2, but less than 3 GiB per process memory?



Malte Cornils wrote:
> we've been trying to make a program (ITK/VTK image processing for a
> university project) work. Unfortunately, the process needs slightly
> above 2 GiB of virtual memory.

When people are that close to the 32-bit limit one of the standard
things I advise folks at work is to port the application to a 64-bit
platform.  If they are so close to the limit it is better to gain
serious room by significantly increasing the size of the limit.
Otherwise they are likely to hit the close limit in the future and
when dealing with objects of that size it is always a stressful time
when the limit prevents the task from working or brings down a server.

> Judging from the documentation I've seen, on 32bit systems I should
> be able to allocate up to 3 GiB of virtual memory (1 GiB of 32bit
> address space is reserved for the kernel).

If you run on an amd64 cpu then you can run the 64-bit kernel.  This
will enable you to access all 4G of process space.  On systems I have
tested that test program I posted will report 3.9G of memory available
to a 32-bit process.  This might get you just enough more headroom on
your existing program.

  Out of memory at 3955 MB

Just to be clear, the amd64/x86_64 kernel is a 64-bit kernel but is
fully 32-bit compatible for userspace programs.  If your cpu is x86_64
then you may upgrade your kernel on your 32-bit system and make no
other changes but will be able to make use of this extra space.  You
can tell if your kernel is long-mode capable by looking at the
/proc/cpuinfo and checking if "lm" shows up in the flags.

  grep 'flags.* lm ' < /proc/cpuinfo

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: