< prev index next >

src/share/vm/memory/allocation.hpp

Print this page

*** 1,7 **** /* ! * Copyright (c) 1997, 2016, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 232,241 **** --- 232,242 ---- // not introduce one. This class is used to allocate both shared read-only // and shared read-write classes. // class ClassLoaderData; + class MetaspaceClosure; class MetaspaceObj { public: bool is_metaspace_object() const; bool is_shared() const;
*** 253,265 **** f(Method) \ f(ConstMethod) \ f(MethodData) \ f(ConstantPool) \ f(ConstantPoolCache) \ ! f(Annotation) \ ! f(MethodCounters) \ ! f(Deallocated) #define METASPACE_OBJ_TYPE_DECLARE(name) name ## Type, #define METASPACE_OBJ_TYPE_NAME_CASE(name) case name ## Type: return #name; enum Type { --- 254,265 ---- f(Method) \ f(ConstMethod) \ f(MethodData) \ f(ConstantPool) \ f(ConstantPoolCache) \ ! f(Annotations) \ ! f(MethodCounters) #define METASPACE_OBJ_TYPE_DECLARE(name) name ## Type, #define METASPACE_OBJ_TYPE_NAME_CASE(name) case name ## Type: return #name; enum Type {
*** 287,300 **** return TypeArrayOtherType; } } void* operator new(size_t size, ClassLoaderData* loader_data, ! size_t word_size, bool read_only, Type type, Thread* thread) throw(); // can't use TRAPS from this header file. void operator delete(void* p) { ShouldNotCallThis(); } }; // Base class for classes that constitute name spaces. class AllStatic { --- 287,305 ---- return TypeArrayOtherType; } } void* operator new(size_t size, ClassLoaderData* loader_data, ! size_t word_size, Type type, Thread* thread) throw(); // can't use TRAPS from this header file. void operator delete(void* p) { ShouldNotCallThis(); } + + // Declare a *static* method with the same signature in any subclass of MetaspaceObj + // that should be read-only by default. See symbol.hpp for an example. This function + // is used by the templates in metaspaceClosure.hpp + static bool is_read_only_by_default() { return false; } }; // Base class for classes that constitute name spaces. class AllStatic {
< prev index next >