mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8205679: Remove unused ThreadLocalAllocBuffer::undo_allocate()
Reviewed-by: shade, stefank
This commit is contained in:
parent
19608b393d
commit
4d06934426
2 changed files with 1 additions and 19 deletions
|
@ -89,8 +89,6 @@ private:
|
||||||
|
|
||||||
size_t remaining();
|
size_t remaining();
|
||||||
|
|
||||||
bool is_last_allocation(HeapWord* obj, size_t size) { return pointer_delta(top(), obj) == size; }
|
|
||||||
|
|
||||||
// Make parsable and release it.
|
// Make parsable and release it.
|
||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
|
@ -143,9 +141,6 @@ public:
|
||||||
inline HeapWord* allocate(size_t size);
|
inline HeapWord* allocate(size_t size);
|
||||||
HeapWord* allocate_sampled_object(size_t size);
|
HeapWord* allocate_sampled_object(size_t size);
|
||||||
|
|
||||||
// Undo last allocation.
|
|
||||||
inline bool undo_allocate(HeapWord* obj, size_t size);
|
|
||||||
|
|
||||||
// Reserve space at the end of TLAB
|
// Reserve space at the end of TLAB
|
||||||
static size_t end_reserve() {
|
static size_t end_reserve() {
|
||||||
int reserve_size = typeArrayOopDesc::header_size(T_INT);
|
int reserve_size = typeArrayOopDesc::header_size(T_INT);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -53,19 +53,6 @@ inline HeapWord* ThreadLocalAllocBuffer::allocate(size_t size) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool ThreadLocalAllocBuffer::undo_allocate(HeapWord* obj, size_t size) {
|
|
||||||
invariants();
|
|
||||||
|
|
||||||
if (!is_last_allocation(obj, size)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
set_top(obj);
|
|
||||||
|
|
||||||
invariants();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline size_t ThreadLocalAllocBuffer::compute_size(size_t obj_size) {
|
inline size_t ThreadLocalAllocBuffer::compute_size(size_t obj_size) {
|
||||||
// Compute the size for the new TLAB.
|
// Compute the size for the new TLAB.
|
||||||
// The "last" tlab may be smaller to reduce fragmentation.
|
// The "last" tlab may be smaller to reduce fragmentation.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue