< prev index next >

src/hotspot/share/memory/allocation.hpp

Print this page

353   }
354 
355   static void* shared_metaspace_base() { return _shared_metaspace_base; }
356   static void* shared_metaspace_top()  { return _shared_metaspace_top;  }
357 
358 #define METASPACE_OBJ_TYPES_DO(f) \
359   f(Class) \
360   f(Symbol) \
361   f(TypeArrayU1) \
362   f(TypeArrayU2) \
363   f(TypeArrayU4) \
364   f(TypeArrayU8) \
365   f(TypeArrayOther) \
366   f(Method) \
367   f(ConstMethod) \
368   f(MethodData) \
369   f(ConstantPool) \
370   f(ConstantPoolCache) \
371   f(Annotations) \
372   f(MethodCounters) \
373   f(SharedClassPathEntry) \
374   f(RecordComponent)



375 
376 #define METASPACE_OBJ_TYPE_DECLARE(name) name ## Type,
377 #define METASPACE_OBJ_TYPE_NAME_CASE(name) case name ## Type: return #name;
378 
379   enum Type {
380     // Types are MetaspaceObj::ClassType, MetaspaceObj::SymbolType, etc
381     METASPACE_OBJ_TYPES_DO(METASPACE_OBJ_TYPE_DECLARE)
382     _number_of_types
383   };
384 
385   static const char * type_name(Type type) {
386     switch(type) {
387     METASPACE_OBJ_TYPES_DO(METASPACE_OBJ_TYPE_NAME_CASE)
388     default:
389       ShouldNotReachHere();
390       return nullptr;
391     }
392   }
393 
394   static MetaspaceObj::Type array_type(size_t elem_size) {

353   }
354 
355   static void* shared_metaspace_base() { return _shared_metaspace_base; }
356   static void* shared_metaspace_top()  { return _shared_metaspace_top;  }
357 
358 #define METASPACE_OBJ_TYPES_DO(f) \
359   f(Class) \
360   f(Symbol) \
361   f(TypeArrayU1) \
362   f(TypeArrayU2) \
363   f(TypeArrayU4) \
364   f(TypeArrayU8) \
365   f(TypeArrayOther) \
366   f(Method) \
367   f(ConstMethod) \
368   f(MethodData) \
369   f(ConstantPool) \
370   f(ConstantPoolCache) \
371   f(Annotations) \
372   f(MethodCounters) \
373   f(RecordComponent) \
374   f(KlassTrainingData) \
375   f(MethodTrainingData) \
376   f(CompileTrainingData) \
377   f(SharedClassPathEntry)
378 
379 #define METASPACE_OBJ_TYPE_DECLARE(name) name ## Type,
380 #define METASPACE_OBJ_TYPE_NAME_CASE(name) case name ## Type: return #name;
381 
382   enum Type {
383     // Types are MetaspaceObj::ClassType, MetaspaceObj::SymbolType, etc
384     METASPACE_OBJ_TYPES_DO(METASPACE_OBJ_TYPE_DECLARE)
385     _number_of_types
386   };
387 
388   static const char * type_name(Type type) {
389     switch(type) {
390     METASPACE_OBJ_TYPES_DO(METASPACE_OBJ_TYPE_NAME_CASE)
391     default:
392       ShouldNotReachHere();
393       return nullptr;
394     }
395   }
396 
397   static MetaspaceObj::Type array_type(size_t elem_size) {
< prev index next >