V8 Project
|
#include <spaces.h>
Classes | |
class | FreeBlock |
Public Member Functions | |
CodeRange (Isolate *isolate) | |
~CodeRange () | |
bool | SetUp (size_t requested_size) |
void | TearDown () |
bool | valid () |
Address | start () |
size_t | size () |
bool | contains (Address address) |
MUST_USE_RESULT Address | AllocateRawMemory (const size_t requested_size, const size_t commit_size, size_t *allocated) |
bool | CommitRawMemory (Address start, size_t length) |
bool | UncommitRawMemory (Address start, size_t length) |
void | FreeRawMemory (Address buf, size_t length) |
Private Member Functions | |
bool | GetNextAllocationBlock (size_t requested) |
DISALLOW_COPY_AND_ASSIGN (CodeRange) | |
Static Private Member Functions | |
static int | CompareFreeBlockAddress (const FreeBlock *left, const FreeBlock *right) |
Private Attributes | |
Isolate * | isolate_ |
base::VirtualMemory * | code_range_ |
List< FreeBlock > | free_list_ |
List< FreeBlock > | allocation_list_ |
int | current_allocation_block_index_ |
|
explicit |
Definition at line 91 of file spaces.cc.
|
inline |
Definition at line 867 of file spaces.h.
References TearDown().
Address v8::internal::CodeRange::AllocateRawMemory | ( | const size_t | requested_size, |
const size_t | commit_size, | ||
size_t * | allocated | ||
) |
Definition at line 186 of file spaces.cc.
References allocation_list_, code_range_, v8::internal::MemoryAllocator::CommitExecutableMemory(), current_allocation_block_index_, DCHECK, GetNextAllocationBlock(), v8::internal::IsAddressAligned(), isolate_, v8::internal::MemoryChunk::kAlignment, v8::internal::Page::kPageSize, v8::internal::Isolate::memory_allocator(), NULL, v8::internal::RoundUp(), v8::internal::CodeRange::FreeBlock::size, and v8::internal::CodeRange::FreeBlock::start.
Referenced by v8::internal::MemoryAllocator::AllocateChunk().
Definition at line 223 of file spaces.cc.
References v8::internal::MemoryAllocator::CommitMemory(), v8::internal::EXECUTABLE, isolate_, v8::internal::Isolate::memory_allocator(), and start().
Referenced by v8::internal::MemoryChunk::CommitArea().
|
staticprivate |
Definition at line 136 of file spaces.cc.
References v8::internal::CodeRange::FreeBlock::start.
Referenced by GetNextAllocationBlock().
Definition at line 887 of file spaces.h.
References v8::base::VirtualMemory::address(), code_range_, v8::base::VirtualMemory::size(), start(), and valid().
Referenced by v8::internal::Heap::AllocateCode(), v8::internal::Heap::CopyCode(), and v8::internal::MemoryAllocator::FreeMemory().
|
private |
void v8::internal::CodeRange::FreeRawMemory | ( | Address | buf, |
size_t | length | ||
) |
Definition at line 233 of file spaces.cc.
References code_range_, DCHECK, free_list_, v8::internal::IsAddressAligned(), v8::internal::MemoryChunk::kAlignment, and v8::base::VirtualMemory::Uncommit().
Referenced by v8::internal::MemoryAllocator::FreeMemory().
|
private |
Definition at line 145 of file spaces.cc.
References allocation_list_, CompareFreeBlockAddress(), current_allocation_block_index_, free_list_, size(), v8::internal::CodeRange::FreeBlock::size, and v8::internal::CodeRange::FreeBlock::start.
Referenced by AllocateRawMemory().
bool v8::internal::CodeRange::SetUp | ( | size_t | requested_size | ) |
Definition at line 99 of file spaces.cc.
References v8::base::VirtualMemory::address(), allocation_list_, CHECK, code_range_, current_allocation_block_index_, DCHECK, isolate_, v8::base::VirtualMemory::IsReserved(), v8::internal::MemoryChunk::kAlignment, v8::internal::kMaximalCodeRangeSize, v8::internal::kRequiresCodeRange, LOG, NULL, v8::internal::RoundUp(), v8::base::VirtualMemory::size(), and size().
Referenced by v8::internal::Heap::SetUp().
|
inline |
Definition at line 883 of file spaces.h.
References code_range_, DCHECK, v8::base::VirtualMemory::size(), and valid().
Referenced by v8::Isolate::GetCodeRange(), GetNextAllocationBlock(), and SetUp().
|
inline |
Definition at line 879 of file spaces.h.
References v8::base::VirtualMemory::address(), code_range_, DCHECK, and valid().
Referenced by CommitRawMemory(), contains(), v8::Isolate::GetCodeRange(), v8::internal::Assembler::runtime_entry_at(), and UncommitRawMemory().
void v8::internal::CodeRange::TearDown | ( | ) |
Definition at line 240 of file spaces.cc.
References allocation_list_, code_range_, free_list_, and NULL.
Referenced by ~CodeRange().
Definition at line 228 of file spaces.cc.
References code_range_, start(), and v8::base::VirtualMemory::Uncommit().
Referenced by v8::internal::MemoryChunk::CommitArea().
|
inline |
Definition at line 878 of file spaces.h.
References code_range_, and NULL.
Referenced by v8::internal::MemoryAllocator::AllocateChunk(), v8::internal::Heap::AllocateCode(), v8::internal::MemoryChunk::CommitArea(), contains(), v8::internal::Heap::CopyCode(), v8::internal::MemoryAllocator::FreeMemory(), v8::Isolate::GetCodeRange(), size(), v8::internal::PagedSpace::SizeOfFirstPage(), and start().
Definition at line 932 of file spaces.h.
Referenced by AllocateRawMemory(), GetNextAllocationBlock(), SetUp(), and TearDown().
|
private |
Definition at line 907 of file spaces.h.
Referenced by AllocateRawMemory(), contains(), FreeRawMemory(), SetUp(), size(), start(), TearDown(), UncommitRawMemory(), and valid().
|
private |
Definition at line 933 of file spaces.h.
Referenced by AllocateRawMemory(), GetNextAllocationBlock(), and SetUp().
Definition at line 929 of file spaces.h.
Referenced by FreeRawMemory(), GetNextAllocationBlock(), and TearDown().
|
private |
Definition at line 904 of file spaces.h.
Referenced by AllocateRawMemory(), CommitRawMemory(), and SetUp().