--- old/src/share/vm/utilities/debug.cpp 2017-11-16 00:47:41.527571298 -0800 +++ new/src/share/vm/utilities/debug.cpp 2017-11-16 00:47:41.453564684 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -315,6 +315,14 @@ } } +void report_insufficient_metaspace(size_t required_size) { + warning("\nThe MaxMetaspaceSize of " SIZE_FORMAT " bytes is not large enough.\n" + "Either don't specify the -XX:MaxMetaspaceSize=\n" + "or increase the size to at least " SIZE_FORMAT ".\n", + MaxMetaspaceSize, required_size); + exit(2); +} + static bool error_reported = false; // call this when the VM is dying--it might loosen some asserts