/macosx-10.9.5/libauto-185.5/ |
H A D | Bitmap.h | 57 static inline const usword_t index(const usword_t bp) { return bp >> bits_per_word_log2; } 65 static inline const usword_t shift(const usword_t bp) { return bp & bits_mask; } 73 inline usword_t cursor_bp(const usword_t *cursor) const { return ((uintptr_t)cursor - (uintptr_t)address()) << bits_per_byte_log2; } 81 inline usword_t *end_cursor() const { return (usword_t *)Range::end(); } 90 Bitmap(usword_t n, void *bits) { 102 inline usword_t *bp_curso [all...] |
H A D | Admin.h | 55 usword_t _quantum_log2; // ilog2 of the quantum used in this admin 60 usword_t _freelist_search_cap; // highest nonempty freelist index (excluding big chunk list), or 0 if all are empty 61 usword_t _layout; // either AUTO_MEMORY_SCANNED or AUTO_MEMORY_UNSCANNED 68 unsigned batch_allocate_from_freelist_slot_no_lock(usword_t cache_slot, usword_t quantum_size, const bool clear, void **results, unsigned num_requested); 74 unsigned batch_allocate_from_subzone_no_lock(Subzone *subzone, usword_t requested_size, const bool clear, void **results, unsigned num_requested); 96 usword_t quantum_log2() const { return _quantum_log2; } 121 inline const usword_t layout() const { return _layout; } 128 inline const usword_t quantum_count(const size_t size) const { 138 usword_t unused_coun [all...] |
H A D | WriteBarrier.h | 51 usword_t _protect; // protected space to base of write barrier 70 WriteBarrier(void *base, void *address, const usword_t size, const usword_t protect = 0) 81 static inline const usword_t bytes_needed(usword_t n) { 91 inline const usword_t card_index(void *address) const { 93 usword_t i = normalized >> write_barrier_quantum_log2; 105 usword_t i = card_index(address); 115 inline void *card_address(usword_t i) const { return displace(_base, i << write_barrier_quantum_log2); } 123 inline bool is_card_marked(usword_t [all...] |
H A D | Bitmap.cpp | 51 void Bitmap::set_bits_large(const usword_t bp, const usword_t n) const { 52 usword_t *cursor = bp_cursor(bp); // address of first word 53 const usword_t sh = shift(bp); // bit shift 75 void Bitmap::clear_bits_large(const usword_t bp, const usword_t n) const { 76 usword_t *cursor = bp_cursor(bp); // address of first word 77 const usword_t sh = shift(bp); // bit shift 93 bool Bitmap::bits_are_clear_large(const usword_t bp, const usword_t [all...] |
H A D | Subzone.h | 72 usword_t _quantum_log2; // ilog2 of the quantum used in this admin 78 usword_t _quantum_bias; // the value added to subzone quantum numbers to get a globally 81 usword_t _in_use; // high water mark 154 static inline usword_t subzone_side_data_max(usword_t quantum_log2) { 156 usword_t header_size = sizeof(Subzone) - sizeof(unsigned char); 158 usword_t bytes_per_quantum = (1LL << quantum_log2) + 1; 170 static inline usword_t subzone_base_data_size(usword_t quantum_log2) { 181 static inline usword_t subzone_allocation_siz [all...] |
H A D | Large.h | 59 usword_t _vm_size; // size of the vm allocation 60 usword_t _size; // size of the requested allocation 61 usword_t _layout; // organization of block 62 usword_t _refcount; // large block reference count 63 usword_t _age; // block age 70 Large(Zone *zone, usword_t vm_size, usword_t size, usword_t layout, usword_t refcount, usword_t ag [all...] |
H A D | Large.cpp | 50 Large::Large(Zone *zone, usword_t vm_size, usword_t size, usword_t layout, usword_t refcount, usword_t age, const WriteBarrier &wb) 61 Large *Large::allocate(Zone *zone, const usword_t size, usword_t layout, bool refcount_is_one) { 63 usword_t header_size = side_data_size(); 66 usword_t allocation_size = align2(size, allocate_quantum_small_log2); 69 usword_t guard_siz [all...] |
H A D | Region.h | 54 usword_t _i_subzones; // number of active subzones 55 usword_t _n_subzones; // total number of subzones 56 usword_t _n_quantum; // total number of quantum avalable 70 static const usword_t bytes_needed() { 79 static usword_t managed_size(usword_t nsubzones) { return (nsubzones << subzone_quantum_log2) + nsubzones * bitmaps_per_region * subzone_bitmap_bytes; } 108 Region(Zone *zone, void *address, usword_t size, usword_t nzones); 134 inline usword_t subzones_remaining() const { return _n_subzones - _i_subzones; } 136 inline usword_t active_subzone [all...] |
H A D | SubzonePartition.h | 51 Admin &admin(const size_t size, const usword_t layout, bool refcount_is_one) { 52 usword_t partion = ((layout & AUTO_UNSCANNED) ? kPartitionUnscanned : 0) | (refcount_is_one ? kPartitionRetained : 0); 57 for (usword_t i = 0; i < kPartitionCount; ++i) { 64 for (usword_t i = kPartitionCount; i > 0; --i) { 71 for (usword_t i = 0; i < kPartitionCount; ++i) { 86 for (usword_t i = 0; i < kPartitionCount; ++i) { 92 usword_t purge_free_space() { 93 usword_t bytes_purged = 0; 94 for (usword_t i = 0; i < kPartitionCount; ++i) { 101 usword_t purge_free_space_no_loc [all...] |
H A D | Definitions.h | 96 typedef unsigned long usword_t; // computational word guaranteed to be unsigned typedef in namespace:Auto 101 inline usword_t auto_atomic_compare_and_swap(usword_t old_value, usword_t new_value, volatile usword_t *addr) 112 inline usword_t auto_atomic_add(sword_t amount, volatile usword_t *addr) 114 usword_t old_value, new_value; 136 is_64BitWord = sizeof(usword_t) == 8u, // true if 64-bit computational word 137 is_32BitWord = sizeof(usword_t) [all...] |
H A D | WriteBarrier.cpp | 43 void WriteBarrier::scan_marked_ranges(void *address, const usword_t size, write_barrier_scanner_t scanner) { 49 usword_t i = card_index(address); 51 const usword_t j = card_index(last); 62 usword_t k = i; 89 void WriteBarrier::scan_marked_ranges(void *address, const usword_t size, void (*scanner) (const Range&, WriteBarrier*, void*), void *arg) { 98 bool WriteBarrier::range_has_marked_cards(void *address, const usword_t size) { 101 usword_t i = card_index(address); 103 const usword_t j = card_index(last); 122 usword_t WriteBarrier::mark_cards_untouched() { 123 usword_t coun [all...] |
H A D | Admin.cpp | 47 void Admin::initialize(Zone *zone, const usword_t quantum_log2, const usword_t layout) { 63 usword_t Admin::unused_count() { 72 usword_t Admin::free_space() { 74 usword_t empty_space = 0; 76 for (usword_t m = 0; m < AllocationCache::cache_size; m++) { 86 const usword_t min_purgeable_size = Auto::page_size; 94 const usword_t quantum_size = (1 << _quantum_log2); 98 for (usword_t m = maximum_quanta, block_size = quantum_size * maximum_quanta; m > 0 && block_size > min_purgeable_size; --m, block_size -= quantum_size) { 127 usword_t Admi [all...] |
H A D | FreeList.h | 48 usword_t _size; // number of free bytes 52 //usword_t _size_again; // at end of free block 62 FreeListNode(FreeListNode *prev, FreeListNode *next, usword_t size) { 81 usword_t size() const { return _size; } 82 usword_t size_again() { return *(usword_t *)displace(this, _size - sizeof(usword_t)); } 113 void set_size(usword_t size) { 117 *(usword_t *)displace(this, _size - sizeof(usword_t)) [all...] |
H A D | BlockRef.cpp | 32 usword_t SubzoneBlockRef::refcount() const { 50 usword_t SubzoneBlockRef::inc_refcount() const { 75 usword_t SubzoneBlockRef::dec_refcount_no_lock() const { 101 usword_t SubzoneBlockRef::dec_refcount() const { 111 usword_t LargeBlockRef::inc_refcount() const { 113 usword_t refcount = _large->refcount() + 1; 118 usword_t LargeBlockRef::dec_refcount_no_lock() const { 119 usword_t rc = refcount(); 130 usword_t LargeBlockRef::dec_refcount() const {
|
H A D | BlockRef.h | 35 const usword_t _q; 38 SubzoneBlockRef(Subzone *subzone, usword_t q) : _subzone(subzone), _q(q) {} 42 inline usword_t q() const { return _q; } 45 inline usword_t size() const { return subzone()->size(q()); } 60 inline void get_description(char *buf, usword_t bufsz) const { snprintf(buf, bufsz, "Subzone=%p, q=%ld", subzone(), (long)q()); } 69 usword_t refcount() const; 70 usword_t inc_refcount() const; 71 usword_t dec_refcount_no_lock() const; 72 usword_t dec_refcount() const; 84 inline usword_t siz [all...] |
H A D | AllocationCache.h | 44 FreeList &operator[] (usword_t index) { return _lists[index]; }
|
H A D | SubzonePartition.cpp | 30 for (usword_t i = 0; i < kPartitionCount; ++i) {
|
H A D | auto_weak.cpp | 36 usword_t num_refs; 37 usword_t num_allocated; 38 usword_t max_hash_displacement; 101 usword_t old_num_allocated = list->num_allocated; 102 usword_t num_refs = list->num_refs; 104 usword_t new_allocated = old_num_allocated < WEAK_TABLE_DOUBLE_SIZE ? old_num_allocated + 1 : old_num_allocated + old_num_allocated; 113 usword_t i; 131 usword_t index = hash(new_referrer) % list->num_allocated, hash_displacement = 0; 154 usword_t index = hash(old_referrer) % list->num_allocated; 155 usword_t start_inde [all...] |
H A D | Region.cpp | 45 usword_t allocation_size; // size of subzone region 89 Region::Region(Zone *zone, void *address, usword_t size, usword_t nsubzones) { 172 usword_t newBitmapSize = Bitmap::bytes_needed(_n_quantum);
|
H A D | ZoneCompaction.cpp | 129 void push(Subzone *subzone, usword_t q) { 137 static bool mark(Subzone *subzone, usword_t q) { return subzone->test_and_set_mark(q); } 140 static bool is_marked(Subzone *subzone, usword_t q) { return subzone->is_marked(q); } 149 usword_t q; 169 void push(Subzone *subzone, usword_t q) {} 172 static bool mark(Subzone *subzone, usword_t q) { return false; } 174 static bool is_marked(Subzone *subzone, usword_t q) { return false; } 183 typedef void (^mark_pinned_t) (void **slot, Subzone *subzone, usword_t q, ReferenceKind kind); 205 inline void mark_pinned(void **slot, Subzone *subzone, usword_t q, ReferenceKind kind) { _marker(slot, subzone, q, kind); } 207 bool is_weak_slot_ivar(void *slot, void *slot_base, usword_t slot_layou [all...] |
H A D | Zone.h | 91 usword_t num_weak_refs; 92 usword_t max_weak_refs; 148 volatile usword_t _allocation_counter; // byte allocation counter (reset after each collection). 149 volatile usword_t _triggered_threshold; // stores _allocation_counter after reset for post collection statistics 171 usword_t _worker_count; 172 usword_t _sleeping_workers; 200 void *allocate_large(Thread &thread, usword_t &size, const usword_t layout, bool clear, bool refcount_is_one); 228 void *arena_allocate_region(usword_t newsize); 233 void *arena_allocate_large(usword_t siz [all...] |
H A D | ZoneCollectors.cpp | 41 usword_t _scanning_threads; 55 void push(Subzone *subzone, usword_t q) { 71 static bool mark(Subzone *subzone, usword_t q) { return subzone->test_and_set_mark(q); } 73 bool is_marked(Subzone *subzone, usword_t q) { return subzone->is_marked(q); } 94 usword_t blocks_scanned = 0; 95 usword_t bytes_scanned = 0; 104 usword_t q = cursor.next_set_bit(); 105 while (q != (usword_t)-1) { 150 void visit(const ReferenceInfo &info, void **slot, Subzone *subzone, usword_t q) {} 173 void visit(const ReferenceInfo &info, void **slot, Subzone *subzone, usword_t [all...] |
H A D | ReferenceIterator.h | 127 // void visit(const ReferenceInfo &info, void **slot, Subzone *subzone, usword_t q); 143 // void push(Subzone *subzone, usword_t q); 151 // scanner.scan(Subzone *subzone, usword_t) or scanner.scan(Large *large). 191 void push(Subzone *subzone, usword_t q) { _pending_stack.push(subzone, q); } 194 bool mark(Subzone *subzone, usword_t q) { return _pending_stack.mark(subzone, q); } 197 bool is_marked(Subzone *subzone, usword_t q) { return _pending_stack.is_marked(subzone, q); } 200 static bool should_scan(Subzone *subzone, usword_t q) { return Configuration::ScanningStrategy::should_scan(subzone, q); } 203 static bool should_mark(Subzone *subzone, usword_t q) { return Configuration::ScanningStrategy::should_mark(subzone, q); } 220 usword_t q; 241 usword_t [all...] |
H A D | Range.h | 57 Range(void *address, usword_t size) : _address(address), _end(displace(address, size)) {} 66 inline const usword_t size() const { return (uintptr_t)_end - (uintptr_t)_address; } 69 inline void set_size(usword_t size) { _end = displace(_address, size); } 71 inline void set_range(void *address, usword_t size) { _address = address; _end = displace(address, size); }
|
H A D | RangeIterator.h | 49 RangeIterator(void *address, const usword_t size)
|