RFR: 8159045: Remove const from methods returning size_t in threadLocalAllocBuffer.hpp
Erik Helin
erik.helin at oracle.com
Wed Jun 8 11:31:31 UTC 2016
Hey all,
here is a tiny patch that removes the const decorator from two static
methods returning size_t. The const decorator doesn't mean anything in
this case since a size_t is always copied.
Bug:
https://bugs.openjdk.java.net/browse/JDK-8159045
Patch:
# HG changeset patch
# User ehelin
# Date 1465385076 -7200
# Wed Jun 08 13:24:36 2016 +0200
# Node ID 7913ba2740284a10754d14df7c6556218eb37051
# Parent a1dc09350fbcd12d858d42903106ae788f77d2d0
8159045: Remove const from methods returning size_t in threadLocalAllocBuffer.hpp
diff -r a1dc09350fbc -r 7913ba274028 src/share/vm/gc/shared/threadLocalAllocBuffer.hpp
--- a/src/share/vm/gc/shared/threadLocalAllocBuffer.hpp Wed Jun 08 11:15:49 2016 +0200
+++ b/src/share/vm/gc/shared/threadLocalAllocBuffer.hpp Wed Jun 08 13:24:36 2016 +0200
@@ -108,8 +108,8 @@
// do nothing. tlabs must be inited by initialize() calls
}
- static const size_t min_size() { return align_object_size(MinTLABSize / HeapWordSize) + alignment_reserve(); }
- static const size_t max_size() { assert(_max_size != 0, "max_size not set up"); return _max_size; }
+ 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 void set_max_size(size_t max_size) { _max_size = max_size; }
HeapWord* start() const { return _start; }
Testing:
- Compiled on Linux x86-64
Thanks,
Erik
More information about the hotspot-gc-dev
mailing list