Boost logo

Boost Users :

Subject: Re: [Boost-users] Memory mapped files
From: Gavin Lambert (boost_at_[hidden])
Date: 2019-01-23 00:46:53


On 21/01/2019 22:41, Simon Giddings wrote:
> We are developing a system which heavily uses memory mapped files.
> These files are initially created under a unix system, but will then be
> used in portable systems such as Android and iOS.
> We are having some problems loading memory mapped files created under
> Unix into Android.

In what context? Using some Boost library or in general?

> Is this scenario even possible ?
> Are the memory mapped files compatible between systems ?

They can be, but are not guaranteed to be, depending on what you're
storing in the memory.

Binary layout of class types is usually not guaranteed cross-platform
(or cross-compiler, for that matter).

Anything involving pointers usually won't work at all, even
cross-process or cross-session, let alone cross-platform.

You can also have issues with padding or value endian ordering,
depending on the specific platforms involved.


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