92eae6d126
Currently, in the following struct struct LayoutObject : GarbageCollected<>, MixinA, MixinB {}; the subobject that corresponds to the first base GarbageCollected<> always takes up some space (one word). The empty-base-optimization doesn't happen because the second base (MixinA) has the same subobject as the first base (GarbageCollected), which is the most parent class GarbageCollectedBase. The compiler can't "merge" them because it must guarantee that distinct objects of the same type have distinct addresses. The attribute [[no_unique_address]] doesn't work for base classes, unfortunately (but is a good idea for a Standard proposal). As a solution, the CL simply removes GarbageCollectedBase. Bug: chromium:1260797 Change-Id: I415b10a5fbcebce3d6ee97b8870ea9ae90f383a8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3259654 Commit-Queue: Anton Bikineev <bikineev@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#77693} |
||
---|---|---|
.. | ||
internal | ||
allocation.h | ||
common.h | ||
cross-thread-persistent.h | ||
custom-space.h | ||
default-platform.h | ||
DEPS | ||
ephemeron-pair.h | ||
explicit-management.h | ||
garbage-collected.h | ||
heap-consistency.h | ||
heap-state.h | ||
heap-statistics.h | ||
heap.h | ||
liveness-broker.h | ||
macros.h | ||
member.h | ||
name-provider.h | ||
object-size-trait.h | ||
OWNERS | ||
persistent.h | ||
platform.h | ||
prefinalizer.h | ||
process-heap-statistics.h | ||
README.md | ||
sentinel-pointer.h | ||
source-location.h | ||
testing.h | ||
trace-trait.h | ||
type-traits.h | ||
visitor.h |
Oilpan: C++ Garbage Collection
Oilpan is an open-source garbage collection library for C++ that can be used stand-alone or in collaboration with V8's JavaScript garbage collector.
Key properties
- Trace-based garbage collection;
- Precise on-heap memory layout;
- Conservative on-stack memory layout;
- Allows for collection with and without considering stack;
- Incremental and concurrent marking;
- Incremental and concurrent sweeping;
- Non-incremental and non-concurrent compaction for selected spaces;
See the Hello World example on how to get started using Oilpan to manage C++ code.
Oilpan follows V8's project organization, see e.g. on how we accept contributions and provide a stable API.