On Sat, Feb 22, 2014 at 1:00 PM, Till Schneidereit
<t...@tillschneidereit.net> wrote:
>
>> If your data is read-only after the point at which Nuwa forks the
>> process (which is once things are mostly loaded but before we load the
>> app) then generally yes.  It's copy-on-write at page granularity of
>> course, so if you have sub-page allocations you can't guarantee that
>> it won't be copied.
>
> That sounds promising. Is there a way to test whether this is, in fact,
> happening for the self-hosting compartment?

Not that I know of. The OS knows which memory pages are shared, but if
it's anonymously mapped data (as the entire malloc heap and GC heaps
are) you can only get data for entire segments, which are usually many
pages. And knowing which segment(s) the relevant data is in is also
difficult.

It's also worth pointing out that Firefox's internal memory reporters
are entirely unaware of the sharing caused by Nuwa, and so will
over-report shared things. I also don't know any way to avoid this.

Nick
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to