
11 Aug
2009
11 Aug
'09
7:01 a.m.
Ion Gaztañaga wrote:
Manish Vachharajani escribió:
I've been happily using Boost.Interprocess to create shared memory regions under FreeBSD 7.2, however, I am having issues on FreeBSD 8.0 pre-release. I can reproduce the problem with Boost 1.39.0 and the svn trunk. The source of the problem appears to be that Boost.Interprocess calls lseek on a file descriptor returned by shm_open, but the results of such an lseek are undefined. Below, I explain further how I came to this conclusion.
You are right, it's undefined, but it usually works. However, I can't find a way to obtain the size of a shared memory segment using POSIX, if you could fin a way to do it it would be really nice.
fstat() ? Cheers, Ian McCulloch