RFR: 8266349: Pass down requested page size to reserve_memory_special

Stefan Johansson sjohanss at openjdk.java.net
Wed May 5 12:57:53 UTC 2021


On Wed, 5 May 2021 12:16:10 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Please review this enhancement that passes the requested page size in `ReservedSpace` down to the OS-layer.
>> 
>> **Summary**
>> After recent refactoring `ReservedSpace` now store the page size used for a reservation. To make this more consistent this change passes down the page size from the `ReservedSpace` down to the OS-layer when using explicit large pages. Currently this is not really needed because we only support one large page size during the lifetime of the JVM, but this will change with PR #1153. That PR will be simpler to implement if the requested page size is passed down from the layers above. 
>> 
>> **Testing**
>> Local testing together with parts of PR #1153. Mach5 tier 1-3
>
> src/hotspot/share/memory/virtualspace.cpp line 172:
> 
>> 170: 
>> 171: static char* reserve_memory_special(char* requested_address, const size_t size,
>> 172:                                     const size_t alignment, const size_t page_size, bool exec) {
> 
> I don't think the const makes sense... nor for the other arguments (but when in Rome...)

Yes, I'm staying in Rome :) But we could certainly clean it up later.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3878


More information about the hotspot-dev mailing list