parmarparveen
asked on
Bus error in shared memory
Hii
I am developing an application that uses posix shared memory to share some data between the different process.
It worked well for quite some days but then when i ran it again after a couple of days , it showed me bus error whenever i tried to fill the shared memory with data.
i wrote a number of different programs earlier for shared memory but i am not able to run a single program now and every program is giving the same bus error.
pls suggest some way to resolve this
I am developing an application that uses posix shared memory to share some data between the different process.
It worked well for quite some days but then when i ran it again after a couple of days , it showed me bus error whenever i tried to fill the shared memory with data.
i wrote a number of different programs earlier for shared memory but i am not able to run a single program now and every program is giving the same bus error.
pls suggest some way to resolve this
ASKER
The behaviour is very unpredictable. now one of my program which is allocating shared memory of size 1000 bytes is working fine while another program which is allocating 500000 bytes is giving the bus error . Is there any restriction on the size of shared memory??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The problem which i am facing is actully faced y other ppl too. It is because i am trying to mmap very large size of memory. The mmap is not returning any error though but still whenevr i try to access the memory(read and write) after a specified no of bytes(4096),its giving bus error.
bus error(the SIGBUS i assume) is reported when MMU reports some kind of error.
Test Your memory with http://memtest.org/ for the start