5#ifndef RUNTIME_VM_VIRTUAL_MEMORY_COMPRESSED_H_
6#define RUNTIME_VM_VIRTUAL_MEMORY_COMPRESSED_H_
14#if defined(DART_COMPRESSED_POINTERS)
15static constexpr intptr_t kCompressedHeapSize = 4 *
GB;
16static constexpr intptr_t kCompressedHeapAlignment = 4 *
GB;
17static constexpr intptr_t kCompressedPageSize =
kPageSize;
18static constexpr intptr_t kCompressedHeapNumPages =
20static constexpr intptr_t kCompressedHeapBitmapSize =
21 kCompressedHeapNumPages / 8;
23#if !defined(DART_HOST_OS_FUCHSIA)
24#define DART_COMPRESSED_HEAP
28#if defined(DART_COMPRESSED_HEAP)
32class VirtualMemoryCompressedHeap :
public AllStatic {
36 static void Init(
void* compressed_heap_region,
size_t size);
44 static MemoryRegion Allocate(intptr_t size, intptr_t alignment);
47 static void Free(
void* address, intptr_t size);
53 static void* GetRegion();
56 static bool IsPageUsed(uword page_id);
57 static void SetPageUsed(uword page_id);
58 static void ClearPageUsed(uword page_id);
62 static uint8_t* pages_;
63 static uword minimum_free_page_id_;
bool Contains(const Container &container, const Value &value)
static constexpr intptr_t kPageSize