8333047: Remove arena-size-workaround in jvmtiUtils.cpp
Reviewed-by: jsjolen, sspitsyn
This commit is contained in:
parent
22ef827e2c
commit
ba323b515d
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2019, 2023 SAP SE. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -43,7 +43,6 @@ STATIC_ASSERT(is_aligned((int)Chunk::tiny_size, ARENA_AMALLOC_ALIGNMENT));
|
||||
STATIC_ASSERT(is_aligned((int)Chunk::init_size, ARENA_AMALLOC_ALIGNMENT));
|
||||
STATIC_ASSERT(is_aligned((int)Chunk::medium_size, ARENA_AMALLOC_ALIGNMENT));
|
||||
STATIC_ASSERT(is_aligned((int)Chunk::size, ARENA_AMALLOC_ALIGNMENT));
|
||||
STATIC_ASSERT(is_aligned((int)Chunk::non_pool_size, ARENA_AMALLOC_ALIGNMENT));
|
||||
|
||||
// MT-safe pool of same-sized chunks to reduce malloc/free thrashing
|
||||
// NB: not using Mutex because pools are used before Threads are initialized
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2024, 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
|
||||
@ -66,8 +66,7 @@ public:
|
||||
tiny_size = 256 - slack, // Size of first chunk (tiny)
|
||||
init_size = 1*K - slack, // Size of first chunk (normal aka small)
|
||||
medium_size= 10*K - slack, // Size of medium-sized chunk
|
||||
size = 32*K - slack, // Default size of an Arena chunk (following the first)
|
||||
non_pool_size = init_size + 32 // An initial size which is not one of above
|
||||
size = 32*K - slack // Default size of an Arena chunk (following the first)
|
||||
};
|
||||
|
||||
static void chop(Chunk* chunk); // Chop this chunk
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2024, 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
|
||||
@ -39,8 +39,7 @@ ResourceArea* JvmtiUtil::_single_threaded_resource_area = nullptr;
|
||||
ResourceArea* JvmtiUtil::single_threaded_resource_area() {
|
||||
if (_single_threaded_resource_area == nullptr) {
|
||||
// lazily create the single threaded resource area
|
||||
// pick a size which is not a standard since the pools don't exist yet
|
||||
_single_threaded_resource_area = new (mtInternal) ResourceArea(Chunk::non_pool_size);
|
||||
_single_threaded_resource_area = new (mtInternal) ResourceArea();
|
||||
}
|
||||
return _single_threaded_resource_area;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user