On Thu, 7 Oct 2021 06:21:09 GMT, Kim Barrett <kbarr...@openjdk.org> wrote:
>> Leo Korinth has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use a thread local buffer so that the compiler might reorder operator new. > > src/hotspot/share/memory/allocation.hpp line 416: > >> 414: static const unsigned BufferSize = 5; >> 415: uintptr_t _begin[BufferSize]; >> 416: uintptr_t _past_end[BufferSize]; > > I think these should be `const void*` rather than `uintptr_t`. Why do you think it is better? Comparing integers might possibly be preferable from comparing pointers from *different* objects that is undefined if I remember correctly. Of course casting them to integers probably does not make it that much better defined, but it feels at least a bit better... I will change it if you still prefer pointer comparison. ------------- PR: https://git.openjdk.java.net/jdk/pull/5387