- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- a question about share memory
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2002 12:35 AM
12-11-2002 12:35 AM
a question about share memory
Thank you very much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2002 12:41 AM
12-11-2002 12:41 AM
Re: a question about share memory
Ensure that shared memory is sufficient for other programs.
Some running program may be already accessing the shard memory address segments which your program is using. Try using higher order of shared memory address in your program which can be free.
regards,
U.SivaKumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2002 12:41 AM
12-11-2002 12:41 AM
Re: a question about share memory
For a test trying running it as root and locking it into memory (shmctl) and see if it still gets overwritten.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2002 12:58 AM
12-11-2002 12:58 AM
Re: a question about share memory
I get the key use ftok function,I think it's unique in the whole system.
I'll try to use shmctl function , But I have to run the program as a common user.
what can I do?
Is it system process overwrite the share memory?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2002 01:06 AM
12-11-2002 01:06 AM
Re: a question about share memory
key = ftok("/usr/caiw",'r');
shmid = shmget(key,SHMSIZE,IPC_CREAT|IPC_EXCL|0666);
if (shmid == -1){...}
shmptr = shmat(shmid,0,0);
shmctl(shmid,IPC_STAT?IPC_SET,buff);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2002 01:13 AM
12-11-2002 01:13 AM
Re: a question about share memory
Use this command to see the information of current active shared memory segments like memory address , owner and permissions in the system
#ipcs -m
Avoid using those segments shown by the above command in your program.
regards,
U.SivaKumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2002 01:20 AM
12-11-2002 01:20 AM
Re: a question about share memory
IPC status from /dev/kmem as of Wed Dec 11 17:18:29 2002
T ID KEY MODE OWNER GROUP
Shared Memory:
m 0 0x41200629 --rw-rw-rw- root root
m 1 0x4e0c0002 --rw-rw-rw- root root
m 2 0x4124037b --rw-rw-rw- root root
m 44003 0x2ee8af94 --rw-r----- oracle dba
m 41004 0x0001e243 --rw-rw-rw- tuxdman app
m 8005 0x00000000 --rw------- tuxdman app
m 12006 0x64203cec --rw-rw-rw- root sys
m 2007 0x6b203cec --rw-rw-rw- root sys
m 2008 0x000003e8 --rw-rw-rw- tuxdman app
m 21009 0x7a203cec --rw-rw-rw- caiwl users
m 4010 0x78203cec --rw-rw-rw- tuxdman app
my key is 0x64203cec and 0x6b203cec,I think is unique in the system.
:'(
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2002 01:33 AM
12-11-2002 01:33 AM
Re: a question about share memory

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2002 01:33 AM
12-11-2002 01:33 AM
Re: a question about share memory
Iam not a expert in calls.
try changing the permission of your program shared memory segment to rw-----
regards,
U.SivaKumar