Skip to content
Permalink
Browse files
8276067: ZGC: Remove unused function alloc_high_address_at_most()
Reviewed-by: eosterlund, stefank
  • Loading branch information
pliden committed Oct 28, 2021
1 parent 593401f commit d88b89f89643dd97092b1debf98e871f873e8f9c
Showing 2 changed files with 0 additions and 26 deletions.
@@ -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;
@@ -86,7 +86,6 @@ class ZMemoryManager {
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);
};

1 comment on commit d88b89f

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on d88b89f Oct 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.