z***@gmail.com
2005-12-16 22:47:47 UTC
I know this sounds like an old-familiar problem , but after reading the
documentation and posts - i still can't get it right...
i'm creating a shared-memory using the shm_open+ftruncate+mmap .
When i have enought available space on my /dev/shm , everything worx
fine . but , when i don't have enought space - all the functions
returns a valid values , but when i tried to access the memory - i got
SIGBUS (Bus Error) .
I can even see the file , using "ls" , and i can access the file
properties with "fstat" (with it's correct size) , but when i try to
"cat" it's contents , i get "No space left on device".
In my production-app , i can check the disk-size before creating the
memory, but i would expect that the ftruncate or the shm_open to fail ,
am i wrong ?
thnx,
zvika
documentation and posts - i still can't get it right...
i'm creating a shared-memory using the shm_open+ftruncate+mmap .
When i have enought available space on my /dev/shm , everything worx
fine . but , when i don't have enought space - all the functions
returns a valid values , but when i tried to access the memory - i got
SIGBUS (Bus Error) .
I can even see the file , using "ls" , and i can access the file
properties with "fstat" (with it's correct size) , but when i try to
"cat" it's contents , i get "No space left on device".
In my production-app , i can check the disk-size before creating the
memory, but i would expect that the ftruncate or the shm_open to fail ,
am i wrong ?
thnx,
zvika