[vm] Set page_size_ to 0 after deleting the compressed heap.

When DEBUG is defined, deleting the compressed heap uses the
page size to check alignments.

TEST=*-debug-{x64c,arm64c} builds

Change-Id: Idc0c3fd213d1639234ae52a19466843464790e64
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-x64c-try,vm-aot-win-debug-x64c-try,vm-linux-debug-x64c-try,vm-win-debug-x64c-try,vm-ffi-android-debug-arm64c-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310581
Reviewed-by: Martin Kustermann <kustermann@google.com>
Auto-Submit: Tess Strickland <sstrickl@google.com>
This commit is contained in:
Tess Strickland 2023-06-21 11:39:50 +00:00
parent b64fc318e7
commit 9a6c33571f
2 changed files with 6 additions and 4 deletions

View file

@ -250,10 +250,11 @@ void VirtualMemory::Init() {
}
void VirtualMemory::Cleanup() {
page_size_ = 0;
#if defined(DART_COMPRESSED_POINTERS)
delete compressed_heap_;
#endif // defined(DART_COMPRESSED_POINTERS)
page_size_ = 0;
#if defined(DART_COMPRESSED_POINTERS)
compressed_heap_ = nullptr;
VirtualMemoryCompressedHeap::Cleanup();
#endif // defined(DART_COMPRESSED_POINTERS)

View file

@ -82,10 +82,11 @@ void VirtualMemory::Init() {
}
void VirtualMemory::Cleanup() {
page_size_ = 0;
#if defined(DART_COMPRESSED_POINTERS)
delete compressed_heap_;
#endif // defined(DART_COMPRESSED_POINTERS)
page_size_ = 0;
#if defined(DART_COMPRESSED_POINTERS)
compressed_heap_ = nullptr;
VirtualMemoryCompressedHeap::Cleanup();
#endif // defined(DART_COMPRESSED_POINTERS)