8296796: Provide clean, platform-agnostic interface to C-heap trimming

Reviewed-by: dholmes, rkennke
This commit is contained in:
Thomas Stuefe 2022-11-19 11:52:55 +00:00
parent c50a9047b4
commit 0845b39caf
10 changed files with 108 additions and 53 deletions

View file

@ -47,4 +47,13 @@ inline bool os::must_commit_stack_guard_pages() {
inline void os::map_stack_shadow_pages(address sp) {
}
// Trim-native support
inline bool os::can_trim_native_heap() {
#ifdef __GLIBC__
return true;
#else
return false; // musl
#endif
}
#endif // OS_LINUX_OS_LINUX_INLINE_HPP