src/share/vm/memory/filemap.hpp

Print this page




  27 
  28 #include "memory/metaspaceShared.hpp"
  29 #include "memory/metaspace.hpp"
  30 
  31 // Layout of the file:
  32 //  header: dump of archive instance plus versioning info, datestamp, etc.
  33 //   [magic # = 0xF00BABA2]
  34 //  ... padding to align on page-boundary
  35 //  read-write space
  36 //  read-only space
  37 //  misc data (block offset table, string table, symbols, dictionary, etc.)
  38 //  tag(666)
  39 
  40 static const int JVM_IDENT_MAX = 256;
  41 
  42 class Metaspace;
  43 
  44 class SharedClassPathEntry VALUE_OBJ_CLASS_SPEC {
  45 public:
  46   const char *_name;
  47   time_t _timestamp;          // jar timestamp,  0 if is directory
  48   long   _filesize;           // jar file size, -1 if is directory



  49   bool is_dir() {
  50     return _filesize == -1;
  51   }
  52 };
  53 
  54 class FileMapInfo : public CHeapObj<mtInternal> {
  55 private:
  56   friend class ManifestStream;
  57   enum {
  58     _invalid_version = -1,
  59     _current_version = 2
  60   };
  61 
  62   bool  _file_open;
  63   int   _fd;
  64   size_t  _file_offset;
  65 
  66 private:
  67   static SharedClassPathEntry* _classpath_entry_table;
  68   static int                   _classpath_entry_table_size;




  27 
  28 #include "memory/metaspaceShared.hpp"
  29 #include "memory/metaspace.hpp"
  30 
  31 // Layout of the file:
  32 //  header: dump of archive instance plus versioning info, datestamp, etc.
  33 //   [magic # = 0xF00BABA2]
  34 //  ... padding to align on page-boundary
  35 //  read-write space
  36 //  read-only space
  37 //  misc data (block offset table, string table, symbols, dictionary, etc.)
  38 //  tag(666)
  39 
  40 static const int JVM_IDENT_MAX = 256;
  41 
  42 class Metaspace;
  43 
  44 class SharedClassPathEntry VALUE_OBJ_CLASS_SPEC {
  45 public:
  46   const char *_name;
  47   time_t _timestamp;          // jar timestamp,  0 if is directory or other
  48   long   _filesize;           // jar file size, -1 if is directory, -2 if other
  49   bool is_jar() {
  50     return _timestamp != 0;
  51   }
  52   bool is_dir() {
  53     return _filesize == -1;
  54   }
  55 };
  56 
  57 class FileMapInfo : public CHeapObj<mtInternal> {
  58 private:
  59   friend class ManifestStream;
  60   enum {
  61     _invalid_version = -1,
  62     _current_version = 2
  63   };
  64 
  65   bool  _file_open;
  66   int   _fd;
  67   size_t  _file_offset;
  68 
  69 private:
  70   static SharedClassPathEntry* _classpath_entry_table;
  71   static int                   _classpath_entry_table_size;