--- a/src/hotspot/os/linux/osContainer_linux.hpp Thu Oct 31 19:31:03 2019 +0000
+++ b/src/hotspot/os/linux/osContainer_linux.hpp Thu Oct 31 19:32:41 2019 +0000
@@ -31,11 +31,16 @@
#define OSCONTAINER_ERROR (-2)
+// 20ms timeout between re-reads of memory limit and _active_processor_count.
+#define OSCONTAINER_CACHE_TIMEOUT (NANOSECS_PER_SEC/50)
+
class OSContainer: AllStatic {
private:
static bool _is_initialized;
static bool _is_containerized;
+ static int _active_processor_count;
+
static jlong read_memory_limit_in_bytes();
public: