Lines Matching refs:Address
78 #define DCHECK_PAGE_ALIGNED(address) \
79 DCHECK((OffsetFrom(address) & Page::kPageAlignmentMask) == 0)
81 #define DCHECK_OBJECT_ALIGNED(address) \
82 DCHECK((OffsetFrom(address) & kObjectAlignmentMask) == 0)
184 INLINE(Address address()) { return reinterpret_cast<Address>(this); }
186 INLINE(static Bitmap* FromAddress(Address addr)) {
276 static MemoryChunk* FromAddress(Address a) {
285 static inline MemoryChunk* FromAnyPointerAddress(Heap* heap, Address addr);
287 Address address() { return reinterpret_cast<Address>(this); }
289 bool is_valid() { return address() != NULL; }
319 owner_ = reinterpret_cast<Address>(space) + kPageHeaderTag;
348 bool Contains(Address addr) {
355 bool ContainsLimit(Address addr) {
511 Address slot_address = reinterpret_cast<Address>(slot);
512 DCHECK(slot_address > this->address());
513 return (slot_address - (this->address() + kObjectStartOffset)) <
517 static void IncrementLiveBytesFromGC(Address address, int by) {
518 MemoryChunk::FromAddress(address)->IncrementLiveBytes(by);
521 static void IncrementLiveBytesFromMutator(Address address, int by);
558 void SetArea(Address area_start, Address area_end) {
581 return Bitmap::FromAddress(address() + kHeaderSize);
586 inline uint32_t AddressToMarkbitIndex(Address addr) {
587 return static_cast<uint32_t>(addr - this->address()) >> kPointerSizeLog2;
590 inline static uint32_t FastAddressToMarkbitIndex(Address addr) {
596 inline Address MarkbitIndexToAddress(uint32_t index) {
597 return this->address() + (index << kPointerSizeLog2);
631 Address area_start() { return area_start_; }
632 Address area_end() { return area_end_; }
639 static inline void UpdateHighWaterMark(Address mark);
646 Address area_start_;
647 Address area_end_;
654 Address owner_;
680 static MemoryChunk* Initialize(Heap* heap, Address base, size_t size,
681 Address area_start, Address area_end,
705 // Returns the page containing a given address. The address ranges
709 INLINE(static Page* FromAddress(Address a)) {
714 // top address can be the upper bound of the page, we need to subtract
715 // it with kPointerSize first. The address ranges from
717 INLINE(static Page* FromAllocationTop(Address top)) {
728 // Checks whether an address is page aligned.
729 static bool IsAlignedToPageSize(Address a) {
733 // Returns the offset of a given address to this page.
734 INLINE(int Offset(Address a)) {
735 int offset = static_cast<int>(a - address());
739 // Returns the address for a given offset to the this page.
740 Address OffsetToAddress(int offset) {
742 return address() + offset;
861 // displacements cover the entire 4GB virtual address space. On 64-bit
879 Address start() {
881 return static_cast<Address>(code_range_->address());
883 bool contains(Address address) {
885 Address start = static_cast<Address>(code_range_->address());
886 return start <= address && address < start + code_range_->size();
892 MUST_USE_RESULT Address AllocateRawMemory(const size_t requested_size,
895 bool CommitRawMemory(Address start, size_t length);
896 bool UncommitRawMemory(Address start, size_t length);
897 void FreeRawMemory(Address buf, size_t length);
907 FreeBlock(Address start_arg, size_t size_arg)
913 : start(static_cast<Address>(start_arg)), size(size_arg) {
918 Address start;
950 starts_[idx] = reinterpret_cast<Address>(-1);
954 Address StartFor(Address addr) { return starts_[RegionNumber(addr)]; }
956 void AddObject(Address addr, int size) {
964 static inline int RegionNumber(Address addr) {
968 static void Update(Address addr, int size) {
986 Address starts_[kSize];
1037 V8_INLINE bool IsOutsideAllocatedSpace(const void* address) const {
1038 return address < lowest_ever_allocated_ ||
1039 address >= highest_ever_allocated_;
1054 Address ReserveAlignedMemory(size_t requested, size_t alignment,
1056 Address AllocateAlignedMemory(size_t reserve_size, size_t commit_size,
1060 bool CommitMemory(Address addr, size_t size, Executability executable);
1063 void FreeMemory(Address addr, size_t size, Executability executable);
1066 // the address is not NULL, the size is greater than zero, and that the
1069 bool CommitBlock(Address start, size_t size, Executability executable);
1075 bool UncommitBlock(Address start, size_t size);
1079 void ZapBlock(Address start, size_t size);
1104 Address start, size_t commit_size,
1141 // Initializes pages in a chunk. Returns the first page address.
1207 Address cur_addr_; // Current iteration point.
1208 Address cur_end_; // End iteration point.
1221 inline void Initialize(PagedSpace* owner, Address start, Address end,
1255 INLINE(void set_top(Address top)) {
1261 INLINE(Address top()) const {
1267 Address* top_address() { return &top_; }
1269 INLINE(void set_limit(Address limit)) {
1275 INLINE(Address limit()) const {
1282 Address* limit_address() { return &limit_; }
1293 Address top_;
1295 Address limit_;
1396 // the raw address of the next free list node (or NULL).
1399 // Obtain a free-list node from a raw address. This is not a cast because
1400 // it does not check nor require that the first word at the address is a map
1402 static FreeListNode* FromAddress(Address address) {
1403 return reinterpret_cast<FreeListNode*>(HeapObject::FromAddress(address));
1530 // i.e., its contents will be destroyed. The start address should be word
1532 int Free(Address start, int size_in_bytes);
1652 // Set up the space using the given address range of virtual memory (from
1666 // Checks whether an object/address is in this space.
1667 inline bool Contains(Address a);
1668 bool Contains(HeapObject* o) { return Contains(o->address()); }
1670 // Given an address occupied by a live object, return that object if it is
1672 // objects in the page containing the address, the cost is linear in the
1674 Object* FindObject(Address addr);
1747 Address top() { return allocation_info_.top(); }
1748 Address limit() { return allocation_info_.limit(); }
1750 // The allocation top address.
1751 Address* allocation_top_address() { return allocation_info_.top_address(); }
1753 // The allocation limit address.
1754 Address* allocation_limit_address() {
1766 int Free(Address start, int size_in_bytes) {
1776 void SetTopAndLimit(Address top, Address limit) {
1920 // address denoted by top in allocation_info_.
2005 static bool IsAtStart(Address addr) {
2010 static bool IsAtEnd(Address addr) {
2014 Address address() { return reinterpret_cast<Address>(this); }
2016 // Finds the NewSpacePage containing the given address.
2017 static inline NewSpacePage* FromAddress(Address address_in_page) {
2018 Address page_start =
2019 reinterpret_cast<Address>(reinterpret_cast<uintptr_t>(address_in_page) &
2025 // Find the page for a limit address. A limit address is either an address
2026 // inside a page, or the address right after the last byte of a page.
2027 static inline NewSpacePage* FromLimit(Address address_limit) {
2032 static inline bool OnSamePage(Address address1, Address address2) {
2042 static NewSpacePage* Initialize(Heap* heap, Address start,
2074 void SetUp(Address start, int initial_capacity, int maximum_capacity);
2093 // Returns the start address of the first page of the space.
2094 Address space_start() {
2099 // Returns the start address of the current page of the space.
2100 Address page_low() { return current_page_->area_start(); }
2102 // Returns one past the end address of the space.
2103 Address space_end() { return anchor_.prev_page()->area_end(); }
2105 // Returns one past the end address of the current page of the space.
2106 Address page_high() { return current_page_->area_end(); }
2119 Address age_mark() { return age_mark_; }
2120 void set_age_mark(Address mark);
2122 // True if the address is in the address range of this semispace (not
2124 bool Contains(Address a) {
2129 // True if the object is a heap object in the address range of this
2156 // The "from" address must be on a page prior to the "to" address,
2158 static void AssertValidRange(Address from, Address to);
2161 inline static void AssertValidRange(Address from, Address to) {}
2200 // The start address of the space.
2201 Address start_;
2203 Address age_mark_;
2226 // semispace from a given start address (defaulting to the bottom of the
2232 // address is given, the iterator starts from the bottom of the space. If
2241 SemiSpaceIterator(NewSpace* space, Address start);
2242 // Iterate from one address to another in the same semi-space.
2243 SemiSpaceIterator(Address from, Address to);
2266 void Initialize(Address start, Address end, HeapObjectCallback size_func);
2269 Address current_;
2271 Address limit_;
2290 inline NewSpacePageIterator(Address start, Address limit);
2343 // True if the address or object lies in the address range of either
2345 bool Contains(Address a) {
2351 Address a = reinterpret_cast<Address>(o);
2414 // Return the address of the allocation pointer in the active semispace.
2415 Address top() {
2420 void set_top(Address top) {
2425 // Return the address of the allocation pointer limit in the active semispace.
2426 Address limit() {
2431 // Return the address of the first object in the active semispace.
2432 Address bottom() { return to_space_.space_start(); }
2435 Address
2437 void set_age_mark(Address mark) { to_space_.set_age_mark(mark); }
2439 // The start address of the space and a bit mask. Anding an address in the
2440 // new space with the mask will result in the start address.
2441 Address start() { return start_; }
2444 INLINE(uint32_t AddressToMarkbitIndex(Address addr)) {
2451 INLINE(Address MarkbitIndexToAddress(uint32_t index)) {
2452 return reinterpret_cast<Address>(index << kPointerSizeLog2);
2455 // The allocation top and limit address.
2456 Address* allocation_top_address() { return allocation_info_.top_address(); }
2458 // The allocation limit address.
2459 Address* allocation_limit_address() {
2478 Address FromSpacePageLow() { return from_space_.page_low(); }
2479 Address FromSpacePageHigh() { return from_space_.page_high(); }
2480 Address FromSpaceStart() { return from_space_.space_start(); }
2481 Address FromSpaceEnd() { return from_space_.space_end(); }
2484 Address ToSpaceStart() { return to_space_.space_start(); }
2485 Address ToSpaceEnd() { return to_space_.space_end(); }
2487 inline bool ToSpaceContains(Address address) {
2488 return to_space_.Contains(address);
2490 inline bool FromSpaceContains(Address address) {
2491 return from_space_.Contains(address);
2494 // True if the object is a heap object in the address range of the
2550 Address chunk_base_;
2559 // Start address and bit mask for containment testing.
2560 Address start_;
2575 Address top_on_previous_step_;
2623 // Given an index, returns the page address.
2747 // Finds an object for a given address, returns a Smi if it is not found.
2749 Object* FindObject(Address a);
2751 // Finds a large object page containing the given address, returns NULL
2753 LargePage* FindPage(Address a);
2775 // Checks whether an address is in the object area in this space. It
2777 bool SlowContains(Address addr) { return FindObject(addr)->IsHeapObject(); }
2847 MemoryChunk* answer = MemoryChunk::FromAddress(heap_object->address());