< prev index next >

src/share/vm/gc/cms/compactibleFreeListSpace.cpp

Print this page
rev 13203 : [mq]: freebldict
rev 13204 : imported patch dither
rev 13205 : imported patch copyyear

*** 1,7 **** /* ! * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 1531,1542 **** } FreeChunk* CompactibleFreeListSpace::getChunkFromDictionary(size_t size) { assert_locked(); ! FreeChunk* fc = _dictionary->get_chunk(size, ! FreeBlockDictionary<FreeChunk>::atLeast); if (fc == NULL) { return NULL; } _bt.allocated((HeapWord*)fc, fc->size()); if (fc->size() >= size + MinChunkSize) { --- 1531,1541 ---- } FreeChunk* CompactibleFreeListSpace::getChunkFromDictionary(size_t size) { assert_locked(); ! FreeChunk* fc = _dictionary->get_chunk(size); if (fc == NULL) { return NULL; } _bt.allocated((HeapWord*)fc, fc->size()); if (fc->size() >= size + MinChunkSize) {
*** 1549,1560 **** } FreeChunk* CompactibleFreeListSpace::getChunkFromDictionaryExact(size_t size) { assert_locked(); ! FreeChunk* fc = _dictionary->get_chunk(size, ! FreeBlockDictionary<FreeChunk>::atLeast); if (fc == NULL) { return fc; } _bt.allocated((HeapWord*)fc, fc->size()); if (fc->size() == size) { --- 1548,1558 ---- } FreeChunk* CompactibleFreeListSpace::getChunkFromDictionaryExact(size_t size) { assert_locked(); ! FreeChunk* fc = _dictionary->get_chunk(size); if (fc == NULL) { return fc; } _bt.allocated((HeapWord*)fc, fc->size()); if (fc->size() == size) {
*** 1563,1574 **** } assert(fc->size() > size, "get_chunk() guarantee"); if (fc->size() < size + MinChunkSize) { // Return the chunk to the dictionary and go get a bigger one. returnChunkToDictionary(fc); ! fc = _dictionary->get_chunk(size + MinChunkSize, ! FreeBlockDictionary<FreeChunk>::atLeast); if (fc == NULL) { return NULL; } _bt.allocated((HeapWord*)fc, fc->size()); } --- 1561,1571 ---- } assert(fc->size() > size, "get_chunk() guarantee"); if (fc->size() < size + MinChunkSize) { // Return the chunk to the dictionary and go get a bigger one. returnChunkToDictionary(fc); ! fc = _dictionary->get_chunk(size + MinChunkSize); if (fc == NULL) { return NULL; } _bt.allocated((HeapWord*)fc, fc->size()); }
*** 2677,2688 **** size_t rem; { MutexLockerEx x(parDictionaryAllocLock(), Mutex::_no_safepoint_check_flag); while (n > 0) { ! fc = dictionary()->get_chunk(MAX2(n * word_sz, _dictionary->min_size()), ! FreeBlockDictionary<FreeChunk>::atLeast); if (fc != NULL) { break; } else { n--; } --- 2674,2684 ---- size_t rem; { MutexLockerEx x(parDictionaryAllocLock(), Mutex::_no_safepoint_check_flag); while (n > 0) { ! fc = dictionary()->get_chunk(MAX2(n * word_sz, _dictionary->min_size())); if (fc != NULL) { break; } else { n--; }
< prev index next >