Operating System - HP-UX
1751936 Members
4539 Online
108783 Solutions
New Discussion юеВ

Re: Errors enabling +q3p option for a program

 
SOLVED
Go to solution

Errors enabling +q3p option for a program

Hi everyone:

I have a process demanding more than ~1.7 GB available by default in 32bit applications. To achieve this I am trying to enable third quadrant of process memory for private memory, whith "chatr" utility:

chatr +q3p enable sadcagnt

The change is made succesfully, but when application services are started again, the following error shows:

gma_open_file->mmap: Not enough space
sys_setup: mkshm() failed

Anything else I must do in addition to changing the flag? Any hint about what could be causing this error? Thanks in advance for your comments

Jose Enrique Gonzalez
Caracas, Venezuela
3 REPLIES 3
Matti_Kurkela
Honored Contributor
Solution

Re: Errors enabling +q3p option for a program

The third quadrant of a 32-bit process is normally used for memory that is shared between different processes - to avoid loading multiple copies of shared libraries, or for inter-process communication.

When you use "chatr +q3p enable", you're expanding the private data space of a program by shrinking the shared memory space.

Those error messages are probably application-specific, but the first one seems to refer to the mmap() system call.

The mmap() system call requests the system to map a file on disk to memory space. Depending on the options given to mmap(), the file may be mapped to either the private space or the shared space. The fact that the error message appears after using "chatr +q3p enable" suggests that this application may be using shared memory for its mmap operation.

The mkshm() does not correspond directly to any system call, but its name suggests it's about to MaKe some SHared Memory. So both error messages may well be related to a lack of shared memory space.

In this situation, looks like your application won't benefit from using the 3rd quadrant as a private space. On the contrary, the shrinkage of the shared memory space that comes with it seems to cause harm to this application.

MK
MK

Re: Errors enabling +q3p option for a program

Thank you, Matti:

Your explanation is quite clear and precise. But a question arises: if you just "enable" 3th quadrant for private memory and left 4th intact, should not the application be able to address shared memory in 4th quadrant? I know this does not work, as it is the first test I did, but I cannot clearly understand why
Dennis Handly
Acclaimed Contributor

Re: Errors enabling +q3p option for a program

>demanding more than ~1.7 GB available by default in 32bit applications.

The default is 1 Gb, not 1.7. Are you linking with -N to get 2 Gb? Or are you talking about the 1.7 Gb limit for shared memory?

Are you mapping the file as private? If not, that +q3p enable is working against you as MK said.

Unfortunately chatr(1) says if you want to use SHMEM_MAGIC, -M, that only works for:
system V shared memory and not other forms of shared memory (like memory mapped files).

>should not the application be able to address shared memory in 4th quadrant?

It depends. That's 1 GB totaled for EVERY user/application on the system. If shared memory is very fragmented, you can't get enough in that one quadrant.