Operating System - HP-UX
1753482 Members
4088 Online
108794 Solutions
New Discussion юеВ

Shared memory segment that has size greater than size of phisycal memory of the machine

 
SOLVED
Go to solution
Alex Vinokur
Frequent Advisor

Shared memory segment that has size greater than size of phisycal memory of the machine

Hi,

HP-UX ia64 v2
HP-UX ia64 v3

int shmget(key_t key, size_t size, int shmflg);

Is it possible to create shared memory segment that has size greater than size of phisycal memory of the machine?

P.S. How to know size of phisycal memory of the machine?

Thanks
5 REPLIES 5
Turgay Cavdar
Honored Contributor
Solution

Re: Shared memory segment that has size greater than size of phisycal memory of the machine

Hi,
The maximum size of the shared memory segment is controlled by the kernel parameter: shmmax. I think it is possible to create shared memory segment that the size is bigger then physical memory (this should be related to total virtual memory). You can see the physical RAM size with the command:
# machinfo

Regards.
Dennis Handly
Acclaimed Contributor

Re: Shared memory segment that has size greater than size of phisycal memory of the machine

>Is it possible to create shared memory segment that has size greater than size of physical memory of the machine?

Sure, that's why they call it virtual memory.
If very much bigger, you'll do lots of swapping.
Alex Vinokur
Frequent Advisor

Re: Shared memory segment that has size greater than size of phisycal memory of the machine

Dennis & Turgay, a lot of thanks.
James R. Ferguson
Acclaimed Contributor

Re: Shared memory segment that has size greater than size of phisycal memory of the machine

Hi:

Yes, but you would be better advised to add more memory if your requirements are as you state.

You can ascertain the physical machine memory with:

# machinfo

...or for 11iv2, examine:

# dmesg

...or:

# echo "selclass qualifier memory;info;wait;infolog"|cstm > /tmp/meminfo

Regards!

....JRF...

Alex Vinokur
Frequent Advisor

Re: Shared memory segment that has size greater than size of phisycal memory of the machine

James, thank you.