Home | History | Annotate | Download | only in heap

Lines Matching full:address

81 #define DCHECK_PAGE_ALIGNED(address) \
82 DCHECK((OffsetFrom(address) & Page::kPageAlignmentMask) == 0)
84 #define DCHECK_OBJECT_ALIGNED(address) \
85 DCHECK((OffsetFrom(address) & kObjectAlignmentMask) == 0)
188 INLINE(Address address()) { return reinterpret_cast<Address>(this); }
190 INLINE(static Bitmap* FromAddress(Address addr)) {
394 + kPointerSize // Address area_start_
395 + kPointerSize // Address area_end_
397 + kPointerSize // Address owner_
441 static MemoryChunk* FromAddress(Address a) {
451 MemoryChunk::FromAddress(object->address())->IncrementLiveBytes(by);
455 static inline MemoryChunk* FromAnyPointerAddress(Heap* heap, Address addr);
457 static inline uint32_t FastAddressToMarkbitIndex(Address addr) {
462 Address mark) {
465 // top points to the next address after the chunk, which effectively belongs
468 intptr_t new_mark = static_cast<intptr_t>(mark - chunk->address());
476 Address address() { return reinterpret_cast<Address>(this); }
478 bool is_valid() { return address() != NULL; }
500 owner_ = reinterpret_cast<Address>(space) + kPageHeaderTag;
527 bool Contains(Address addr) {
534 bool ContainsLimit(Address addr) {
650 void SetArea(Address area_start, Address area_end) {
670 return Bitmap::FromAddress(address() + kHeaderSize);
675 inline uint32_t AddressToMarkbitIndex(Address addr) {
676 return static_cast<uint32_t>(addr - this->address()) >> kPointerSizeLog2;
679 inline Address MarkbitIndexToAddress(uint32_t index) {
680 return this->address() + (index << kPointerSizeLog2);
724 Address area_start() { return area_start_; }
725 Address area_end() { return area_end_; }
736 static MemoryChunk* Initialize(Heap* heap, Address base, size_t size,
737 Address area_start, Address area_end,
744 Address area_start_;
745 Address area_end_;
752 Address owner_;
804 // Returns the page containing a given address. The address ranges
808 INLINE(static Page* FromAddress(Address a)) {
813 // top address can be the upper bound of the page, we need to subtract
814 // it with kPointerSize first. The address ranges from
816 INLINE(static Page* FromAllocationTop(Address top)) {
833 // Checks whether an address is page aligned.
834 static bool IsAlignedToPageSize(Address a) {
838 // Returns the offset of a given address to this page.
839 INLINE(int Offset(Address a)) {
840 int offset = static_cast<int>(a - address());
844 // Returns the address for a given offset to the this page.
845 Address OffsetToAddress(int offset) {
847 return address() + offset;
1062 // displacements cover the entire 4GB virtual address space. On 64-bit
1076 Address start() {
1078 return static_cast<Address>(code_range_->address());
1084 bool contains(Address address) {
1086 Address start = static_cast<Address>(code_range_->address());
1087 return start <= address && address < start + code_range_->size();
1093 MUST_USE_RESULT Address AllocateRawMemory(const size_t requested_size,
1096 bool CommitRawMemory(Address start, size_t length);
1097 bool UncommitRawMemory(Address start, size_t length);
1098 void FreeRawMemory(Address buf, size_t length);
1113 FreeBlock(Address start_arg, size_t size_arg)
1119 : start(static_cast<Address>(start_arg)), size(size_arg) {
1124 Address start;
1163 starts_[idx] = reinterpret_cast<Address>(-1);
1167 Address StartFor(Address addr) { return starts_[RegionNumber(addr)]; }
1169 void AddObject(Address addr, int size) {
1177 static inline int RegionNumber(Address addr) {
1181 static void Update(Address addr, int size) {
1199 Address starts_[kSize];
1263 V8_INLINE bool IsOutsideAllocatedSpace(const void* address) {
1264 return address < lowest_ever_allocated_.Value() ||
1265 address >= highest_ever_allocated_.Value();
1280 Address ReserveAlignedMemory(size_t requested, size_t alignment,
1282 Address AllocateAlignedMemory(size_t reserve_size, size_t commit_size,
1286 bool CommitMemory(Address addr, size_t size, Executability executable);
1288 void FreeNewSpaceMemory(Address addr, base::VirtualMemory* reservation,
1291 void FreeMemory(Address addr, size_t size, Executability executable);
1294 // the address is not NULL, the size is greater than zero, and that the
1297 bool CommitBlock(Address start, size_t size, Executability executable);
1303 bool UncommitBlock(Address start, size_t size);
1307 void ZapBlock(Address start, size_t size);
1338 Address start, size_t commit_size,
1375 // Initializes pages in a chunk. Returns the first page address.
1439 Address cur_addr_; // Current iteration point.
1440 Address cur_end_; // End iteration point.
1452 inline void Initialize(PagedSpace* owner, Address start, Address end,
1485 AllocationInfo(Address top, Address limit) : top_(top), limit_(limit) {}
1487 void Reset(Address top, Address limit) {
1492 INLINE(void set_top(Address top)) {
1498 INLINE(Address top()) const {
1504 Address* top_address() { return &top_; }
1506 INLINE(void set_limit(Address limit)) {
1510 INLINE(Address limit()) const {
1514 Address* limit_address() { return &limit_; }
1525 Address top_;
1527 Address limit_;
1750 // its contents will be destroyed. The start address should be word aligned,
1752 int Free(Address start, int size_in_bytes);
1950 // Set up the space using the given address range of virtual memory (from
1960 // Checks whether an object/address is in this space.
1961 inline bool Contains(Address a);
1965 bool ContainsSafe(Address addr);
1967 // Given an address occupied by a live object, return that object if it is
1969 // objects in the page containing the address, the cost is linear in the
1971 Object* FindObject(Address addr);
2025 Address top() { return allocation_info_.top(); }
2026 Address limit() { return allocation_info_.limit(); }
2028 // The allocation top address.
2029 Address* allocation_top_address() { return allocation_info_.top_address(); }
2031 // The allocation limit address.
2032 Address* allocation_limit_address() {
2058 int Free(Address start, int size_in_bytes) {
2067 void SetTopAndLimit(Address top, Address limit) {
2159 void AddMemory(Address start, intptr_t size);
2183 // address denoted by top in allocation_info_.
2187 // at the address denoted by top in allocation_info_. Writes the aligned
2299 static bool IsAtStart(Address addr) {
2304 static bool IsAtEnd(Address addr) {
2308 Address address() { return reinterpret_cast<Address>(this); }
2310 // Finds the NewSpacePage containing the given address.
2311 static inline NewSpacePage* FromAddress(Address address_in_page) {
2312 Address page_start =
2313 reinterpret_cast<Address>(reinterpret_cast<uintptr_t>(address_in_page) &
2319 // Find the page for a limit address. A limit address is either an address
2320 // inside a page, or the address right after the last byte of a page.
2321 static inline NewSpacePage* FromLimit(Address address_limit) {
2326 static inline bool OnSamePage(Address address1, Address address2) {
2336 static NewSpacePage* Initialize(Heap* heap, Address start,
2368 void SetUp(Address start, int initial_capacity, int target_capacity,
2391 // Returns the start address of the first page of the space.
2392 Address space_start() {
2397 // Returns the start address of the current page of the space.
2398 Address page_low() { return current_page_->area_start(); }
2400 // Returns one past the end address of the space.
2401 Address space_end() { return anchor_.prev_page()->area_end(); }
2403 // Returns one past the end address of the current page of the space.
2404 Address page_high() { return current_page_->area_end(); }
2417 Address age_mark() { return age_mark_; }
2418 void set_age_mark(Address mark);
2420 // True if the address is in the address range of this semispace (not
2422 bool Contains(Address a) {
2427 address range of this
2463 // The "from" address must be on a page prior to the "to" address,
2465 static void AssertValidRange(Address from, Address to);
2468 inline static void AssertValidRange(Address from, Address to) {}
2506 // The start address of the space.
2507 Address start_;
2509 Address age_mark_;
2529 // semispace from a given start address (defaulting to the bottom of the
2543 void Initialize(Address start, Address end);
2546 Address current_;
2548 Address limit_;
2565 inline NewSpacePageIterator(Address start, Address limit);
2594 // least step_size bytes have been allocated. soon_object is the address just
2605 virtual void Step(int bytes_allocated, Address soon_object, size_t size) = 0;
2610 void InlineAllocationStep(int bytes_allocated, Address soon_object,
2670 // True if the address or object lies in the address range of either
2672 bool Contains(Address a) {
2678 Address a = reinterpret_cast<Address>(o);
2724 intptr_t PagesFromStart(Address addr) {
2759 // Return the address of the allocation pointer in the active semispace.
2760 Address top() {
2765 // Return the address of the allocation pointer limit in the active semispace.
2766 Address limit() {
2771 // Return the address of the first object in the active semispace.
2772 Address bottom() { return to_space_.space_start(); }
2775 Address age_mark() { return from_space_.age_mark(); }
2777 void set_age_mark(Address mark) { to_space_.set_age_mark(mark); }
2779 // The start address of the space and a bit mask. Anding an address in the
2780 // new space with the mask will result in the start address.
2781 Address start() { return start_; }
2784 INLINE(uint32_t AddressToMarkbitIndex(Address addr)) {
2791 INLINE(Address MarkbitIndexToAddress(uint32_t index)) {
2792 return reinterpret_cast<Address>(index << kPointerSizeLog2);
2795 // The allocation top and limit address.
2796 Address* allocation_top_address() { return allocation_info_.top_address(); }
2798 // The allocation limit address.
2799 Address* allocation_limit_address() {
2837 Address FromSpacePageLow() { return from_space_.page_low(); }
2838 Address FromSpacePageHigh() { return from_space_.page_high(); }
2839 Address FromSpaceStart() { return from_space_.space_start(); }
2840 Address FromSpaceEnd() { return from_space_.space_end(); }
2843 Address ToSpaceStart() { return to_space_.space_start(); }
2844 Address ToSpaceEnd() { return to_space_.space_end(); }
2846 inline bool ToSpaceContains(Address address) {
2847 return to_space_.Contains(address);
2849 inline bool FromSpaceContains(Address address) {
2850 return from_space_.Contains(address);
2853 // True if the object is a heap object in the address range of the
2910 Address chunk_base_;
2919 // Start address and bit mask for containment testing.
2920 Address start_;
2935 Address top_on_previous_step_;
2944 // operation. top is the memory address of the bump pointer at the last
2946 // allocated since the last step.) new_top is the address of the bump pointer
2949 void InlineAllocationStep(Address top, Address new_top, Address soon_object,
2984 void AddExternalMemory(Address start, int size_in_bytes) {
3072 // Given an index, returns the page address.
3140 // Finds an object for a given address, returns a Smi if it is not found.
3142 Object* FindObject(Address a);
3144 // Finds a large object page containing the given address, returns NULL
3146 LargePage* FindPage(Address a);
3156 bool Contains(Address address);
3172 // Checks whether an address is in the object area in this space. It
3174 bool SlowContains(Address addr) { return FindObject(addr)->IsHeapObject(); }