flightaware / speedtables

Speed tables is a high-performance memory-resident database. The speed table compiler reads a table definition and generates a set of C access routines to create, manipulate and search tables containing millions of rows. Currently oriented towards Tcl.
https://flightaware.github.io/speedtables/
BSD 3-Clause "New" or "Revised" License
66 stars 16 forks source link

Reimplement support for flags to mmap (nosync nocore) #38

Open bovine opened 11 years ago

bovine commented 11 years ago

During the Boost reimplementation in the cpp branch, support for the "flags" argument to mmap() had to be removed because Boost did not support overriding it at the time.

However, Boost Version 1.54.0 now supports platform-specific flags to mapped_region so we should re-add support for it.

https://svn.boost.org/trac/boost/ticket/8030 http://boost.2283326.n4.nabble.com/interprocess-Platform-specific-flags-for-mapped-region-td4642667.html http://www.boost.org/users/history/version_1_54_0.html

bovine commented 11 years ago

currently waiting for FreeBSD ports to be updated to boost 1.54 first. I've contacted the ports maintainer and he said: "I'm exp-running to make sure it doesn't break a port depending one it. Might need a couple of more weeks to finish it."

gahr commented 10 years ago

Just in case this was forgotten, we now ship boost 1.55.0 :)

bovine commented 10 years ago

To specify the "options" argument of mapped_region to managed_mapped_file, we need to do this:

Hi Jeff,

You need to pass those options from several classes and the interface will become very ugly (too many arguments) say:

basic_managed_mapped_file's constructor -> managed_open_or_create_impl's constructor -> managed_open_or_create_impl::priv_open_or_create

and in this function, pass it to the newly created mapped_region in the map_options_t argument.

Adding this and other options would require a modification to the interface of managed classes and I haven't had time to try to design a cleaner interface to pass multiple options.

Hope this helps,

Ion