--- old/src/hotspot/share/runtime/os.hpp 2017-11-20 13:39:28.780831439 -0500 +++ new/src/hotspot/share/runtime/os.hpp 2017-11-20 13:39:28.643831670 -0500 @@ -135,6 +135,8 @@ static void pd_free_memory(char *addr, size_t bytes, size_t alignment_hint); static void pd_realign_memory(char *addr, size_t bytes, size_t alignment_hint); + static size_t pd_committed_stack_size(address bottom, size_t size); + static size_t page_size_for_region(size_t region_size, size_t min_pages, bool must_be_aligned); // Get summary strings for system information in buffer provided @@ -268,6 +270,10 @@ static void map_stack_shadow_pages(address sp); static bool stack_shadow_pages_available(Thread *thread, const methodHandle& method, address sp); + // Return size of stack that is actually committed. For Java thread, the bottom should be above + // guard pages (stack grows downward) + static size_t committed_stack_size(address bottom, size_t size); + // OS interface to Virtual Memory // Return the default page size.