src/hotspot/share/include/cds.h
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 54927 1512d88b24c6
child 58679 9c3209ff7550
equal deleted inserted replaced
58677:13588c901957 58678:9cf78a70fa4f
    31 // We should use only standard C types. Do not use custom types such as bool, intx,
    31 // We should use only standard C types. Do not use custom types such as bool, intx,
    32 // etc, to avoid introducing unnecessary dependencies to other HotSpot type declarations.
    32 // etc, to avoid introducing unnecessary dependencies to other HotSpot type declarations.
    33 //
    33 //
    34 // Also, this is a C header file. Do not use C++ here.
    34 // Also, this is a C header file. Do not use C++ here.
    35 
    35 
    36 #define NUM_CDS_REGIONS 9
    36 #define NUM_CDS_REGIONS 8 // this must be the same as MetaspaceShared::n_regions
    37 #define CDS_ARCHIVE_MAGIC 0xf00baba2
    37 #define CDS_ARCHIVE_MAGIC 0xf00baba2
    38 #define CDS_DYNAMIC_ARCHIVE_MAGIC 0xf00baba8
    38 #define CDS_DYNAMIC_ARCHIVE_MAGIC 0xf00baba8
    39 #define CURRENT_CDS_ARCHIVE_VERSION 5
    39 #define CURRENT_CDS_ARCHIVE_VERSION 8
    40 #define INVALID_CDS_ARCHIVE_VERSION -1
    40 #define INVALID_CDS_ARCHIVE_VERSION -1
    41 
    41 
    42 struct CDSFileMapRegion {
    42 struct CDSFileMapRegion {
    43   int        _crc;           // crc checksum of the current space
    43   int        _crc;            // crc checksum of the current space
    44   size_t     _file_offset;   // sizeof(this) rounded to vm page size
    44   size_t     _file_offset;    // sizeof(this) rounded to vm page size
    45   union {
    45   union {
    46     char*    _base;          // copy-on-write base address
    46     char*    _base;           // copy-on-write base address
    47     size_t   _offset;        // offset from the compressed oop encoding base, only used
    47     size_t   _offset;         // offset from the compressed oop encoding base, only used
    48                              // by archive heap space
    48                               // by archive heap space
    49   } _addr;
    49   } _addr;
    50   size_t     _used;          // for setting space top on read
    50   size_t     _used;           // for setting space top on read
    51   int        _read_only;     // read only space?
    51   int        _read_only;      // read only space?
    52   int        _allow_exec;    // executable code in space?
    52   int        _allow_exec;     // executable code in space?
    53   void*      _oopmap;        // bitmap for relocating embedded oops
    53   void*      _oopmap;         // bitmap for relocating embedded oops
    54   size_t     _oopmap_size_in_bits;
    54   size_t     _oopmap_size_in_bits;
       
    55   int        _is_heap_region; // used in debug build only.
    55 };
    56 };
    56 
    57 
    57 struct CDSFileMapHeaderBase {
    58 struct CDSFileMapHeaderBase {
    58   unsigned int _magic;           // identify file type
    59   unsigned int _magic;           // identify file type
    59   int          _crc;             // header crc checksum
    60   int          _crc;             // header crc checksum