GGC questions

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

GGC questions

paraboul
Hey,

I'm currently moving from 38 to 45 and trying to figure out various things.

- Is there a way to move something right away to the tenured zone? (e.g. because I know that the object is long lived and will outlive the first GC anyway).

- Is it safe to assume that an object constructed from a JSClass with a finalizer will be allocated in the tenured zone and so keep a reference in a TenuredHeap<T> directly (instead of a regular Heap<T>)?

- Does an object in the tenured zone can move? (maybe because of the CGC?)

Thanks!

--
Anthony Catel.
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|

Re: GGC questions

Boris Zbarsky
On 11/6/16 10:21 AM, [hidden email] wrote:
> - Is there a way to move something right away to the tenured zone?

I'm not seeing public API for this.  There are internal APIs that take a
NewObjectKind, but nothing taking that seems to be exposed.

> - Is it safe to assume that an object constructed from a JSClass with a finalizer will be allocated in the tenured zone

I believe it happens to be true right now that if there is a finalizer
_and_ the JSClass doesn't have the JSCLASS_SKIP_NURSERY_FINALIZE flag.
But it's not clear to me to what extent this is guaranteed going
forward, if at all.

> - Does an object in the tenured zone can move? (maybe because of the CGC?)

Yes, indeed.

-Boris
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine