index next >

src/share/vm/memory/freeList.hpp

Print this page
rev 8156 : [mq]: 8066444


 123     if (v != NULL) {
 124       v->clear_next();
 125     }
 126   }
 127 
 128   // No locking checks in read-accessors: lock-free reads (only) are benign.
 129   // Readers are expected to have the lock if they are doing work that
 130   // requires atomicity guarantees in sections of code.
 131   size_t size() const {
 132     return _size;
 133   }
 134   void set_size(size_t v) {
 135     assert_proper_lock_protection();
 136     _size = v;
 137   }
 138   ssize_t count() const { return _count; }
 139   void set_count(ssize_t v) { _count = v;}
 140 
 141   size_t get_better_size() { return size(); }
 142 


 143   size_t returned_bytes() const { ShouldNotReachHere(); return 0; }
 144   void set_returned_bytes(size_t v) {}
 145   void increment_returned_bytes_by(size_t v) {}
 146 
 147   // Unlink head of list and return it.  Returns NULL if
 148   // the list is empty.
 149   Chunk_t* get_chunk_at_head();
 150 
 151   // Remove the first "n" or "count", whichever is smaller, chunks from the
 152   // list, setting "fl", which is required to be empty, to point to them.
 153   void getFirstNChunksFromList(size_t n, FreeList<Chunk_t>* fl);
 154 
 155   // Unlink this chunk from it's free list
 156   void remove_chunk(Chunk_t* fc);
 157 
 158   // Add this chunk to this free list.
 159   void return_chunk_at_head(Chunk_t* fc);
 160   void return_chunk_at_tail(Chunk_t* fc);
 161 
 162   // Similar to returnChunk* but also records some diagnostic


 123     if (v != NULL) {
 124       v->clear_next();
 125     }
 126   }
 127 
 128   // No locking checks in read-accessors: lock-free reads (only) are benign.
 129   // Readers are expected to have the lock if they are doing work that
 130   // requires atomicity guarantees in sections of code.
 131   size_t size() const {
 132     return _size;
 133   }
 134   void set_size(size_t v) {
 135     assert_proper_lock_protection();
 136     _size = v;
 137   }
 138   ssize_t count() const { return _count; }
 139   void set_count(ssize_t v) { _count = v;}
 140 
 141   size_t get_better_size() { return size(); }
 142 
 143   size_t list_size() const { return count() * size(); }
 144 
 145   size_t returned_bytes() const { ShouldNotReachHere(); return 0; }
 146   void set_returned_bytes(size_t v) {}
 147   void increment_returned_bytes_by(size_t v) {}
 148 
 149   // Unlink head of list and return it.  Returns NULL if
 150   // the list is empty.
 151   Chunk_t* get_chunk_at_head();
 152 
 153   // Remove the first "n" or "count", whichever is smaller, chunks from the
 154   // list, setting "fl", which is required to be empty, to point to them.
 155   void getFirstNChunksFromList(size_t n, FreeList<Chunk_t>* fl);
 156 
 157   // Unlink this chunk from it's free list
 158   void remove_chunk(Chunk_t* fc);
 159 
 160   // Add this chunk to this free list.
 161   void return_chunk_at_head(Chunk_t* fc);
 162   void return_chunk_at_tail(Chunk_t* fc);
 163 
 164   // Similar to returnChunk* but also records some diagnostic
index next >