mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8257162: Initialize ThreadLocalAllocBuffer members
Reviewed-by: shade, ayang, sjohanss, pliden
This commit is contained in:
parent
337d7bce03
commit
962f7a3bae
2 changed files with 22 additions and 4 deletions
|
@ -37,6 +37,27 @@ size_t ThreadLocalAllocBuffer::_max_size = 0;
|
||||||
int ThreadLocalAllocBuffer::_reserve_for_allocation_prefetch = 0;
|
int ThreadLocalAllocBuffer::_reserve_for_allocation_prefetch = 0;
|
||||||
unsigned int ThreadLocalAllocBuffer::_target_refills = 0;
|
unsigned int ThreadLocalAllocBuffer::_target_refills = 0;
|
||||||
|
|
||||||
|
ThreadLocalAllocBuffer::ThreadLocalAllocBuffer() :
|
||||||
|
_start(NULL),
|
||||||
|
_top(NULL),
|
||||||
|
_pf_top(NULL),
|
||||||
|
_end(NULL),
|
||||||
|
_allocation_end(NULL),
|
||||||
|
_desired_size(0),
|
||||||
|
_refill_waste_limit(0),
|
||||||
|
_allocated_before_last_gc(0),
|
||||||
|
_bytes_since_last_sample_point(0),
|
||||||
|
_number_of_refills(0),
|
||||||
|
_fast_refill_waste(0),
|
||||||
|
_slow_refill_waste(0),
|
||||||
|
_gc_waste(0),
|
||||||
|
_slow_allocations(0),
|
||||||
|
_allocated_size(0),
|
||||||
|
_allocation_fraction(TLABAllocationWeight) {
|
||||||
|
|
||||||
|
// do nothing. TLABs must be inited by initialize() calls
|
||||||
|
}
|
||||||
|
|
||||||
size_t ThreadLocalAllocBuffer::remaining() {
|
size_t ThreadLocalAllocBuffer::remaining() {
|
||||||
if (end() == NULL) {
|
if (end() == NULL) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -111,10 +111,7 @@ private:
|
||||||
int slow_allocations() const { return _slow_allocations; }
|
int slow_allocations() const { return _slow_allocations; }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ThreadLocalAllocBuffer() : _allocated_before_last_gc(0), _bytes_since_last_sample_point(0),
|
ThreadLocalAllocBuffer();
|
||||||
_allocation_fraction(TLABAllocationWeight) {
|
|
||||||
// do nothing. tlabs must be inited by initialize() calls
|
|
||||||
}
|
|
||||||
|
|
||||||
static size_t min_size() { return align_object_size(MinTLABSize / HeapWordSize) + alignment_reserve(); }
|
static size_t min_size() { return align_object_size(MinTLABSize / HeapWordSize) + alignment_reserve(); }
|
||||||
static size_t max_size() { assert(_max_size != 0, "max_size not set up"); return _max_size; }
|
static size_t max_size() { assert(_max_size != 0, "max_size not set up"); return _max_size; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue