Lines Matching defs:free

5  * This code is free software; you can redistribute it and/or modify it
225 // offsets match. The ability to tell free chunks from objects
278 // end of a collection, we let CMSTrigger[Perm]Ratio of the (purported) free
381 double CMSStats::cms_free_adjustment_factor(size_t free) const {
386 void CMSStats::adjust_cms_free_adjustment_factor(bool fail, size_t free) {
393 size_t cms_free = _cms_gen->cmsSpace()->free();
568 -1 /* lock-free */, "No_lock" /* dummy */),
881 // part of the space ends in a free block we should add that to
894 return free() + _virtual_space.uncommitted_size();
952 double free_percentage = ((double) free()) / capacity();
956 // compute expansion delta needed for reaching desired free percentage
967 gclog_or_tty->print_cr(" Desired free fraction %f",
969 gclog_or_tty->print_cr(" Maximum free fraction %f",
993 gclog_or_tty->print_cr(" Expanded free fraction %f",
994 ((double) free()) / capacity());
1029 assert(!((FreeChunk*)res)->is_free(), "Error, block will look free but show wrong size");
1096 // is in flux from being free to being allocated (and in
1153 size_t free_words = eden->free() / HeapWordSize;
1317 // one of three states. A free block (FREE), an allocated
1394 assert(!((FreeChunk*)obj_ptr)->is_free(), "Error, block will look free but show wrong size");
1403 assert(!((FreeChunk*)obj_ptr)->is_free(), "Error, block will look free but show wrong size");
1424 assert(!((FreeChunk*)obj_ptr)->is_free(), "Error, block will look free but show wrong size");
1513 gclog_or_tty->print_cr("free="SIZE_FORMAT, _cmsGen->free());
1614 // we will be out of sufficient free space given allocation rate estimates.]
1678 // Need the free list locks for the call to free() in compute_new_size()
1814 assert(haveFreelistLocks(), "Must be holding free list locks");
1923 // after obtaining the free list locks for the
2041 // in the free list space. We do so by reading and clearing
2056 size_t free_size = cms_space->free();
2060 "All the free space should be compacted into one chunk at top");
2064 "All the free space should be in a single chunk");
2068 "There should be at most 2 free chunks after compaction");
2140 // Get locks for all free lists in all generations that this
2147 // Release locks for all free lists in all generations that this
2154 // Check locks for all free lists in all generations that this
2367 _cmsGen->free());
2632 // Because of the need to lock the free lists and other structures in
2674 getFreelistLocks(); // gets free list locks on constituent spaces
2846 assert(haveFreelistLocks(), "must hold free list locks");
2905 assert(haveFreelistLocks(), "must hold free list locks");
3157 // Fix the linear allocation blocks to look like free blocks.
3986 // Fast lock-free check
4073 // locking the free list locks; see bug 6324141.
4967 assert(haveFreelistLocks(), "must have free list locks");
4982 assert(haveFreelistLocks(), "must have free list locks");
6088 size_policy()->avg_cms_free_at_sweep()->sample(_cmsGen->free());
6131 // We need all the free list locks to make the abstract state
6269 // contiguous free and/or garbage blocks:
6283 // If we hold the free list lock, for all practical purposes
6308 // We need to free-up/coalesce garbage/blocks from a
6309 // co-terminal free run. This is done in the SweepClosure
7963 _inFreeRange(false), // No free range at beginning of sweep
7964 _freeRangeInFreeLists(false), // No free range at beginning of sweep
8017 "Already free "SIZE_FORMAT" objects, "SIZE_FORMAT" bytes",
8045 gclog_or_tty->print("---- Start free range at 0x%x with free block (%d)\n",
8048 assert(!inFreeRange(), "Trampling existing free range");
8057 assert(fc->is_free(), "A chunk on the free list should be free.");
8059 assert(_sp->verify_chunk_in_free_list(fc), "Chunk is not in free lists");
8067 // contiguous free blocks. Thus, unless the sweeper and the allocator
8069 // This is accomplished by the sweeper locking the free lists while
8070 // it is sweeping. Thus blocks that are determined to be free are
8071 // indeed free. There is however one additional complication:
8106 // Flush any free range we might be holding as a single
8107 // coalesced chunk to the appropriate free list.
8130 // Chunk that is already free
8170 // split deaths - a free chunk is removed from its free list because
8172 // split birth - a free chunk is being added to its free list because
8173 // a larger free chunk has been split and resulted in this free chunk.
8174 // coal death - a free chunk is being removed from its free list because
8175 // it is being coalesced into a large free chunk.
8176 // coal birth - a free chunk is being added to its free list because
8177 // it was created when two or more free chunks where coalesced into
8178 // this free chunk.
8180 // These statistics are used to determine the desired number of free
8208 // be chosen. The "hint" associated with a free list, if non-null, points
8209 // to a free list which may be overpopulated.
8215 // free lists.
8218 "free chunk should be in free lists");
8220 // a chunk that is already free, should not have been
8223 assert(!_bitMap->isMarked(addr), "free chunk should be unmarked");
8235 } else { // Not adaptive free lists
8236 // this is a free chunk that can potentially be coalesced by the sweeper;
8238 // if the next chunk is a free block that can't be coalesced
8239 // it doesn't make sense to remove this chunk from the free lists
8242 if ((HeapWord*)nextChunk < _sp->end() && // There is another free chunk to the right ...
8243 nextChunk->is_free() && // ... which is free...
8247 // Potentially the start of a new free range:
8248 // Don't eagerly remove it from the free lists.
8251 // if it is a free block in a region that is beyond
8253 // Remember the start of a free run.
8258 // the midst of a free range, we are coalescing
8261 gclog_or_tty->print(" -- pick up free block 0x%x (%d)\n", fc, size);
8263 // remove it from the free lists
8266 // If the chunk is being coalesced and the current free range is
8267 // in the free lists, remove the current free range so that it
8268 // will be returned to the free lists in its entirety - all
8273 "Size of free range is inconsistent with chunk size.");
8276 "free range is not in free lists");
8288 // Code path common to both original and adaptive free lists.
8291 // as the end of a free run if any
8302 // This is a chunk of garbage. It is not in any free list.
8303 // Add it to a free list or let it possibly be coalesced into
8316 // start of a new free range
8317 assert(size > 0, "A free range should have a size");
8321 // free range
8325 // If the chunk is being coalesced and the current free range is
8326 // in the free lists, remove the current free range so that it
8327 // will be returned to the free lists in its entirety - all
8332 "Size of free range is inconsistent with chunk size.");
8335 "free range is not in free lists");
8342 // this will be swept up when we hit the end of the free range
8357 // left hand chunk to the free lists.
8422 // of the adaptive free list allocator.
8427 assert(_sp->verify_chunk_in_free_list(fc), "free chunk is not in free lists");
8467 // Should the current free range be coalesced?
8468 // If the chunk is in a free range and either we decided to coalesce above
8474 // Coalesce the current free range on the left with the new
8475 // chunk on the right. If either is on a free list,
8480 "Size of free range is inconsistent with chunk size.");
8483 "Chunk is not in free lists");
8492 "The chunk has the wrong size or is not in the free lists");
8497 } else { // not in a free range and/or should not coalesce
8498 // Return the current free range and start a new one.
8500 // In a free range but cannot coalesce with the right hand chunk.
8501 // Put the current free range into the free lists.
8505 // Set up for new free range. Pass along whether the right hand
8506 // chunk is in the free lists.
8512 // If we are tracking a free range, and this is the last chunk that
8514 // flush it along with any free range we may be holding on to. Note that
8515 // this can be the case only for an already free or freshly garbage
8520 // free block to be coalesced with the newly expanded portion,
8524 assert(inFreeRange(), "Should only be called if currently in a free range.");
8531 assert(eob == _limit || fc->is_free(), "Only a free chunk should allow us to cross over the limit");
8538 // Return the storage we are tracking back into the free lists.
8548 assert(inFreeRange(), "Should only be called if currently in a free range.");
8550 "A zero sized chunk cannot be added to the free lists.");
8556 "chunk should not be in free lists yet");
8559 gclog_or_tty->print_cr(" -- add free block 0x%x (%d) to free lists",
8562 // A new free range is going to be starting. The current
8563 // free range has not been added to the free lists yet or
8565 // If the current free range was coalesced, then the death
8566 // of the free range was recorded. Record a birth now.
8573 gclog_or_tty->print_cr("Already in free list: nothing to flush");
8582 // Return current free chunk being used for coalescing (if any)
8584 // free block encountered will start a coalescing range of
8585 // free blocks. If the next free block is adjacent to the
9224 // . desired free percentage or greater is used
9250 size_t cur_promo = free();
9259 size_policy->avg_cms_promo()->sample(free());