![]() |
|
|
|
|
|||||||
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| POSIX Thread - Memory leak | laurovalente | High Level Programming | 1 | 05-08-2008 09:26 AM |
| Shared memory in shared library | DreamWarrior | High Level Programming | 12 | 05-30-2007 01:33 PM |
| memory sharing - not shared memory - | elzalem | High Level Programming | 9 | 05-02-2007 04:45 AM |
| Shared memory shortage but lots of unused memory | cjcamaro | UNIX for Advanced & Expert Users | 1 | 10-13-2004 02:10 PM |
| Shared Memory | Jayathirtha | UNIX for Advanced & Expert Users | 3 | 03-03-2003 08:30 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Shared Memory (Posix)
hi
I had to create a shared memory segment which allows the creation of 8 child processes each with 1024 bytes and contains a common buffer area of 2096bytes. i was able to create the shared memory with shm_open() followed by ftruncate() and mmap() system calls. but for the shared buffer, i guess i have to create a buffer and allocate the specified size but the problem is am nt too sure how to map it in the shared memory. and as for the child processes, this will require the fork() system call but sometimes it says child process and dynamically child process (i.e created as and when required) can you guide plz and if possible any links for developing shared memory application(POSIX and not SYSTEM V). Thxs Looking forward to your reply |
| Forum Sponsor | ||
|
|
|
|||
|
There are many
|
|
|||
|
This sounds like school assignment. The differences are not that great. We do not support school work here.
This page has examples of both. N ote the "POSIX" section is not all that big: IPC:Shared Memory Read the one paragraph on POSIX. Use all of the rest of the examples, change open() calls to shm_open() and close() to shm_unlink(). And there you are. system V -> POSIX. |
|||
| Google UNIX.COM |
| Thread Tools | |
| Display Modes | |
|
|