Boost logo

Boost Users :

From: Sachin Garg (schngrg_at_[hidden])
Date: 2008-07-29 19:37:47


Well, that atleast confirms I am not the only one banging my head on
the wall due to this :-)

I don't think the reference count solution can work here as process
crashes can leave reference count invalid. Any other possible solution
you might have implemented?

Sachin Garg

On Wed, Jul 30, 2008 at 2:30 AM, <peter_foelsche_at_[hidden]> wrote:
> Microsoft has a lot of faults but when comparing Windows API to the LINUX API I take windows every day.
>
> I remember having to clean up shared memory segments by and then under some UNIX OS -- I guess it was SOLARIS.
>
> I also remember that mmap()/munmap() (on SOLARIS) did not behave in a manner, which I would prefer as a C++ programmer, since multiple calls to mmap() could be undone by a single call to munmap(). I hope that this problem was considered when writing the memory mapped io features of boost. I guess you would need some static container of all pointers returned by mmap() and some reference count indicating how often the matching pointer was returned by mmap():
>
>
> static std::map<void*, size_t> s_sMmap2RefCount;
>
> I also remember the amount of code I wrote to hack around the UNIX feature of killing processes which write to a dead pipe.
>
> I also remember the amount of code I wrote to get the errno from execvp() into the process which called fork().
>
> I also remember having to write code in C instead of C++, since the code was supposed to be linked into a shared library which was intended to be dlopen-ed by some third party executable which in turn may or may not be loading the correct C++ library -- consider that UNIX knows only about a single namespaces for all symbols in a process.
>
> I also remember that I could not write C++ code with a post-C++-Exception-Handling-style, since the matching compiler did not implement C++ Exception Handling correctly for a couple of years after this feature was already working on Windows and OS/2. The UNIX compiler did call destructors for memory locations for which no constructor had been called and vs. versa, they were forgetting to call destructors for initialized temporary objects.
>
> I hate the UNIX API because I'm a C++ programmer.
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net