LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   shared memory (https://www.linuxquestions.org/questions/linux-newbie-8/shared-memory-512180/)

hegdeshashi 12-20-2006 03:00 AM

shared memory
 
Hi,

I am having 2 programs for server & client shared memory ,
I want to check,how memory segments are working.

Can any one give me brief idea about.

hegdeshashi 12-20-2006 06:14 AM

Hello

I am unable to compile this programs.
http://cis.poly.edu/muller/CS623/unixsharedmemory.htm
==========================================
: gcc -o client_shm client_shm.c
/tmp/cc4rdKrD.o(.text+0x4a): In function `main':
: undefined reference to `err_sys'
/tmp/cc4rdKrD.o(.text+0x7e): In function `main':
: undefined reference to `err_sys'
/tmp/cc4rdKrD.o(.text+0x90): In function `main':
: undefined reference to `sem_create'
/tmp/cc4rdKrD.o(.text+0xae): In function `main':
: undefined reference to `err_sys'
/tmp/cc4rdKrD.o(.text+0xc0): In function `main':
: undefined reference to `sem_create'
/tmp/cc4rdKrD.o(.text+0xde): In function `main':
: undefined reference to `err_sys'
/tmp/cc4rdKrD.o(.text+0x112): In function `main':
: undefined reference to `err_sys'
/tmp/cc4rdKrD.o(.text+0x145): In function `main':
: undefined reference to `err_sys'
/tmp/cc4rdKrD.o(.text+0x156): In function `main':
: undefined reference to `sem_close'
/tmp/cc4rdKrD.o(.text+0x167): In function `main':
: undefined reference to `sem_close'
/tmp/cc4rdKrD.o(.text+0x189): In function `client':
: undefined reference to `sema_wait'
/tmp/cc4rdKrD.o(.text+0x1d9): In function `client':
: undefined reference to `sys_err_str'
/tmp/cc4rdKrD.o(.text+0x237): In function `client':
: undefined reference to `sem_signal'
/tmp/cc4rdKrD.o(.text+0x24: In function `client':
: undefined reference to `sem_wait'
/tmp/cc4rdKrD.o(.text+0x28f): In function `client':
: undefined reference to `sem_signal'
/tmp/cc4rdKrD.o(.text+0x2a0): In function `client':
: undefined reference to `sem_wait'
/tmp/cc4rdKrD.o(.text+0x2ec): In function `client':
: undefined reference to `sem_signal'
collect2: ld returned 1 exit status
[root@localhost 20]# gcc -o client_shm client_shm.c
/tmp/cccuk2D3.o(.text+0x4a): In function `main':
: undefined reference to `err_sys'
/tmp/cccuk2D3.o(.text+0x7e): In function `main':
: undefined reference to `err_sys'
/tmp/cccuk2D3.o(.text+0x90): In function `main':
: undefined reference to `sem_create'
/tmp/cccuk2D3.o(.text+0xae): In function `main':
: undefined reference to `err_sys'
/tmp/cccuk2D3.o(.text+0xc0): In function `main':
: undefined reference to `sem_create'
/tmp/cccuk2D3.o(.text+0xde): In function `main':
: undefined reference to `err_sys'
/tmp/cccuk2D3.o(.text+0x112): In function `main':
: undefined reference to `err_sys'
/tmp/cccuk2D3.o(.text+0x145): In function `main':
: undefined reference to `err_sys'
/tmp/cccuk2D3.o(.text+0x156): In function `main':
: undefined reference to `sem_close'
/tmp/cccuk2D3.o(.text+0x167): In function `main':
: undefined reference to `sem_close'
/tmp/cccuk2D3.o(.text+0x189): In function `client':
: undefined reference to `sema_wait'
/tmp/cccuk2D3.o(.text+0x1d9): In function `client':
: undefined reference to `sys_err_str'
/tmp/cccuk2D3.o(.text+0x237): In function `client':
: undefined reference to `sem_signal'
/tmp/cccuk2D3.o(.text+0x24: In function `client':
: undefined reference to `sem_wait'
/tmp/cccuk2D3.o(.text+0x28f): In function `client':
: undefined reference to `sem_signal'
/tmp/cccuk2D3.o(.text+0x2a0): In function `client':
: undefined reference to `sem_wait'
/tmp/cccuk2D3.o(.text+0x2ec): In function `client':
: undefined reference to `sem_signal'
collect2: ld returned 1 exit status

==========================

is it correct?


All times are GMT -5. The time now is 09:30 AM.