< prev index next >
src/hotspot/share/include/cds.h
Print this page
@@ -31,16 +31,18 @@
// We should use only standard C types. Do not use custom types such as bool, intx,
// etc, to avoid introducing unnecessary dependencies to other HotSpot type declarations.
//
// Also, this is a C header file. Do not use C++ here.
-#define NUM_CDS_REGIONS 9
+#define NUM_CDS_REGIONS 8 // this must be the same as MetaspaceShared::n_regions
#define CDS_ARCHIVE_MAGIC 0xf00baba2
#define CDS_DYNAMIC_ARCHIVE_MAGIC 0xf00baba8
-#define CURRENT_CDS_ARCHIVE_VERSION 5
+#define CURRENT_CDS_ARCHIVE_VERSION 6
#define INVALID_CDS_ARCHIVE_VERSION -1
+#define JVM_IDENT_MAX 256
+
struct CDSFileMapRegion {
int _crc; // crc checksum of the current space
size_t _file_offset; // sizeof(this) rounded to vm page size
union {
char* _base; // copy-on-write base address
@@ -56,10 +58,11 @@
struct CDSFileMapHeaderBase {
unsigned int _magic; // identify file type
int _crc; // header crc checksum
int _version; // must be CURRENT_CDS_ARCHIVE_VERSION
+ char _jvm_ident[JVM_IDENT_MAX]; // identifier of the JVM with which this archive was generated
struct CDSFileMapRegion _space[NUM_CDS_REGIONS];
};
typedef struct CDSFileMapHeaderBase CDSFileMapHeaderBase;
< prev index next >