8276067: ZGC: Remove unused function alloc_high_address_at_most()

Reviewed-by: eosterlund, stefank
This commit is contained in:
Per Liden 2021-10-28 10:10:05 +00:00
parent 593401fe8b
commit d88b89f896
2 changed files with 0 additions and 26 deletions

View File

@ -172,31 +172,6 @@ uintptr_t ZMemoryManager::alloc_high_address(size_t size) {
return UINTPTR_MAX;
}
uintptr_t ZMemoryManager::alloc_high_address_at_most(size_t size, size_t* allocated) {
ZLocker<ZLock> locker(&_lock);
ZMemory* area = _freelist.last();
if (area != NULL) {
if (area->size() <= size) {
// Smaller than or equal to requested, remove area
const uintptr_t start = area->start();
*allocated = area->size();
_freelist.remove(area);
destroy(area);
return start;
} else {
// Larger than requested, shrink area
shrink_from_back(area, size);
*allocated = size;
return area->end();
}
}
// Out of memory
*allocated = 0;
return UINTPTR_MAX;
}
void ZMemoryManager::free(uintptr_t start, size_t size) {
assert(start != UINTPTR_MAX, "Invalid address");
const uintptr_t end = start + size;

View File

@ -86,7 +86,6 @@ public:
uintptr_t alloc_low_address(size_t size);
uintptr_t alloc_low_address_at_most(size_t size, size_t* allocated);
uintptr_t alloc_high_address(size_t size);
uintptr_t alloc_high_address_at_most(size_t size, size_t* allocated);
void free(uintptr_t start, size_t size);
};