Commit 2756a006 authored by Nikolaos Papaspyrou's avatar Nikolaos Papaspyrou Committed by V8 LUCI CQ

[heap] Fix object start bitmap for PagedNewSpace

This CL allows the PagedNewSpace to be used with flag
v8_enable_inner_pointer_resolution_osb.

Bug: v8:12612
Bug: v8:12851
Change-Id: I63eea4e75398ffec38e562cce245394c0d2a637c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3782670Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81951}
parent 7990a606
......@@ -617,6 +617,10 @@ class V8_EXPORT_PRIVATE PagedSpaceForNewSpace final : public PagedSpaceBase {
void Verify(Isolate* isolate, ObjectVisitor* visitor) const final;
#endif
#ifdef V8_ENABLE_INNER_POINTER_RESOLUTION_OSB
void ClearUnusedObjectStartBitmaps() {}
#endif // V8_ENABLE_INNER_POINTER_RESOLUTION_OSB
private:
const size_t initial_capacity_;
const size_t max_capacity_;
......@@ -678,7 +682,7 @@ class V8_EXPORT_PRIVATE PagedNewSpace final : public NewSpace {
// Return the available bytes without growing.
// TODO(v8:12612): Rethink this method. In SemiSpaceNewSpace available memory
// was continous memory. With PagedNewSpace it is the sum of blocks in the
// was contiguous memory. With PagedNewSpace it is the sum of blocks in the
// freelist. Available() returning X does not guarantee that an object of size
// lower than X can be allocated without growing as it might still not fit in
// any block in the freelist.
......@@ -771,6 +775,12 @@ class V8_EXPORT_PRIVATE PagedNewSpace final : public NewSpace {
PagedSpaceBase* paged_space() { return &paged_space_; }
#ifdef V8_ENABLE_INNER_POINTER_RESOLUTION_OSB
void ClearUnusedObjectStartBitmaps() override {
paged_space_.ClearUnusedObjectStartBitmaps();
}
#endif // V8_ENABLE_INNER_POINTER_RESOLUTION_OSB
private:
bool EnsureAllocation(int size_in_bytes, AllocationAlignment alignment,
AllocationOrigin origin,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment