> i type >gcc gc.c -D_GNU_SOURCE -lpthread -g -Wall then i got ld errors
> like this >...undefined reference to `shm_open',....undefined reference
> to `shm_unlink' but they could be found in mman.h why i couldn't use
> them?
> (i using red hat 7.1)
> thanks
> best regard
> joe
The shared memory is part of the kernel.
Check that it has been compiled inside the kernel.
Then check that you have ipc part of the glibc.
You should find (and use !)
/usr/include/sys/ipc.h
/usr/include/sys/shm.h
Then link with the glibc....
Nothing more to do !!!
Good luck.
Jocelyn.