Urgent!!!! - Write/read to/from shared memory


 
Thread Tools Search this Thread
Top Forums Programming Urgent!!!! - Write/read to/from shared memory
# 1  
Old 02-20-2010
Urgent!!!! - Write/read to/from shared memory

I created a shared memory and attached it. I also created the appropriate semaphores to sync. my read/write operations. However I do not know how am I supposed to do so. Anyone has got any ideas? I want to write int the form of 1234:23:444:... where each number between : means something to the user. I also want to be able to read whole parts between : and not the whole string. Please guys i really need some help here. Thnaks in advance Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Shared library with acces to shared memory.

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)
Discussion started by: iamjag
5 Replies

2. Programming

Linux read and write external memory.

Hi everyone. I asked once here and it went well, so I'm very happy with this community. I have a new question to ask. I would like to read&write specify memory of a process which is not the process I'm doing it from, nor a child nor a parent. So, I want to do a program similar to Cheat... (3 Replies)
Discussion started by: lilezek
3 Replies

3. IP Networking

read/write,write/write lock with smbclient fails

Hi, We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
Discussion started by: swatidas11
1 Replies

4. UNIX for Dummies Questions & Answers

Write/Read in Shared memory

I have created and attached a shared memory segment. However I do not know how am I supposed to write and read data from it. I want to save various different data on this segment such as process IDs and other. Do you know how am I supposed to write these and be able to read such data in the correct... (1 Reply)
Discussion started by: tyron
1 Replies

5. Programming

Write into shared memory segments

I have created a shared memory segment (which size is 64 bytes) using shmget, shmat e.t.c and i want to divide it into 2 areas. One area for input data and one area for output? How can i do that? Furthermore, When i have to write my input data into the shared memory segment i want to write... (3 Replies)
Discussion started by: mae4
3 Replies

6. Programming

Shared memory for shared library

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)
Discussion started by: otheus
0 Replies

7. Programming

shared memory read/write using threads

I am looking for C program source code. Could you please help me in finding the source code required mentioned below. program to create multiple threads (one master thread and rest worker threads) and using the threads write into and read from shared memory Restrictions: Only one thread... (2 Replies)
Discussion started by: kumars
2 Replies

8. Programming

Shared memory in shared library

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)
Discussion started by: DreamWarrior
12 Replies

9. Programming

memory sharing - not shared memory -

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)
Discussion started by: elzalem
9 Replies

10. UNIX for Advanced & Expert Users

Shared memory shortage but lots of unused memory

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)
Discussion started by: cjcamaro
1 Replies
Login or Register to Ask a Question
ipcrm(1)						      General Commands Manual							  ipcrm(1)

NAME
ipcrm - Removes message queue, semaphore set, or shared memory identifiers SYNOPSIS
ipcrm [-m shared_memory] [-M shared_memory_key] [-q message_queue] [-Q message_key] [-s semaphore_ID] [-S semaphore_key] The ipcrm command removes one or more message queue, semaphore set, or shared memory identifiers. STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: ipcrm: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. OPTIONS
Removes the shared memory identifier shared_memory. The shared memory segment and data structure associated with shared_memory are also removed after the last detach operation. Removes the shared memory identifier, created with key shared_memory_key. The shared memory seg- ment and data structure associated with it are also removed after the last detach. Removes the message queue identifier message_queue and the message queue and data structure associated with it. Removes the message queue identifier, created with key message_key, and the mes- sage queue and data structure associated with it. Removes the semaphore identifier semaphore_ID and the set of semaphores and data struc- ture associated with it. Removes the semaphore identifier, created with key semaphore_key, and the set of semaphores and data structure associated with it. DESCRIPTION
The details of the remove operations are described in the Section 2 reference pages for msgctl(), shmctl(), and semctl(). The identifiers and keys can be found by using the ipcs command. EXAMPLES
To remove the shared memory segment associated with shared memory identifier 18602, enter: ipcrm -m 18602 SEE ALSO
Commands: ipcs(1) Functions: msgctl(2), msgget(2), semctl(2), semget(2), semop(2), shmctl(2), shmget(2) ipcrm(1)