I'm facing a problem interpreting the shared memory key on an AIX machine.
(1) I go to a property file and I see the following:
(2) So I now go the command prompt and do this:
And, I do not find it. So what I do is to run the ipcs -m command again and I now see the keys in this format:
When I do a ps -eaf | grep 119112066, I see a bunch of processes like (note the shmkey argument as you scroll right)
So my question is, how to interpret 119112066 in this hexadecimal 0x01051165 language? What might I be missing? Because what I eventually want to do is to create my own shared memory key and make sure I don't mess up anybody else's keys.
Thanks,
-Vijay
Last edited by vijaygade; 01-14-2010 at 10:39 PM..
Hexadecimal key displayed in the output of the command 'ipcs -m' is the hexadecimal value of the shm_key you have given to create the shared memory. Here I think you are pointing to the incorrect shared memory hex value.
For your reference, Here is the program, which will create shared memory. and its reference ids in ipcs -m command. Hope this will clarify your question.
This program creates the Shared memory with the key 119112066, and returns the shmid.
So 0x07198182 is hex value of the key 119112066..
Hello.
I am new to this forum and I would like to ask for advice about low level POSIX programming.
I have to implement a POSIX compliant C shared library.
A file will have some variables and the shared library will have some functions which need those variables.
There is one special... (5 Replies)
I am writing a shared library in Linux (but compatible with other UNIXes) and I want to allow multiple instances to share a piece of memory -- 1 byte is enough. What's the "best" way to do this? I want to optimize for speed and portability.
Obviously, I'll have to worry about mutual exclusion. (0 Replies)
I need to create a shared library to access an in memory DB. The DB is not huge, but big enough to make it cumbersome to carry around in every single process using the shared library. Luckily, it is pretty static information, so I don't need to worry much about synchronizing the data between... (12 Replies)
hi,
this is the problem: i want to swap a linked list between 4 processes (unrelated), is there any way i can do that just by sending a pointer to a structure?
//example
typedef struct node
{
int x;
char c;
struct node *next;
} node;
or i should send the items ( x,c ) by... (9 Replies)
what i want to do is have an int that can been written into by 2 processes but my code doesn't seem to work.
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
#include <sys/shm.h>
#include<stdio.h>
#define KEY1 (1492)
int main()
{
int shmid;
volatile int * addr;... (6 Replies)
Hi all :confused: ,
I am new to unix.I have been asked to implement shared memory in user's mode.What does this mean?What is the difference it makes in kernel mode and in users mode?What are the advantages of this impemenation(user's mode)?
And also i would like to know why exactly shared... (0 Replies)
I am running HP-UX B.11.11.
I'm increasing a parameter for a database engine so that it uses more memory to buffer the disk drive (to speed up performance). I have over 5GB of memory not being used.
But when I try to start the DB with the increased buffer parameter I get told.
"Not... (1 Reply)
Hello! I have some trouble trying to configure a VPN with two gateways. One of them uses IPSec with a single key, 256bits length, specified in /etc/ipsec.secrets. As FreeSwan manual page says, if i put esp=3des-md5-96, will be used a "64bit IV key (internally generated), a 192bit 3des ekey and a... (3 Replies)
Dear Reader,
Is is necessary to attach / dettach the shared memory segments for write operations , if more than one program is accessing same shared memory segments..
I have used semaphore mutex and still I'm getting segmentation fault when I write to the segment when other program is already... (1 Reply)