Could anyone please spend their precious time to look into the problem I am
facing......

I have written a shared memory program (of course with little help of
Internet) but when I tried to run the program it gives me seg fault. I have
attached the C program to have a look at it. 

To run this program and to get the desired output please enter the following

./shmem -r 20 -w 3 -s 10   (where 'r' is the number of reader thread
                                              'w' is the number of writer
thread
                                              's' is the size of shmem
segment)

When I am executing this command it works fine...

But when I am trying to increase writer thread it gives me seg fault.

./shmem -r 20 -w 4 -s 10 ( Here I have increased the 'w' number of writer
thread)

This program is not working only in case if I am trying to create 4 or more
writer threads. Could anyone please look into it and suggest me where I am
doing wrong..... http://www.nabble.com/file/p19220523/reader.c.txt
reader.c.txt  http://www.nabble.com/file/p19220523/header.h.txt header.h.txt 
http://www.nabble.com/file/p19220523/main.c.txt main.c.txt 
http://www.nabble.com/file/p19220523/parsenerror.c.txt parsenerror.c.txt 
http://www.nabble.com/file/p19220523/reader.c.txt reader.c.txt 
http://www.nabble.com/file/p19220523/writer.c.txt writer.c.txt 
-- 
View this message in context: 
http://www.nabble.com/Error-in-the-Program-tp19220523p19220523.html
Sent from the C-prog mailing list archive at Nabble.com.

Reply via email to