< prev index next >

src/share/vm/memory/virtualspace.hpp

Print this page




  64   char*  base()            const { return _base;      }
  65   size_t size()            const { return _size;      }
  66   size_t alignment()       const { return _alignment; }
  67   bool   special()         const { return _special;   }
  68   bool   executable()      const { return _executable;   }
  69   size_t noaccess_prefix() const { return _noaccess_prefix;   }
  70   bool is_reserved()       const { return _base != NULL; }
  71   void release();
  72 
  73   // Splitting
  74   ReservedSpace first_part(size_t partition_size, size_t alignment,
  75                            bool split = false, bool realloc = true);
  76   ReservedSpace last_part (size_t partition_size, size_t alignment);
  77 
  78   // These simply call the above using the default alignment.
  79   inline ReservedSpace first_part(size_t partition_size,
  80                                   bool split = false, bool realloc = true);
  81   inline ReservedSpace last_part (size_t partition_size);
  82 
  83   // Alignment
  84   static size_t page_align_size_up(size_t size);
  85   static size_t page_align_size_down(size_t size);
  86   static size_t allocation_align_size_up(size_t size);
  87   static size_t allocation_align_size_down(size_t size);
  88 };
  89 
  90 ReservedSpace
  91 ReservedSpace::first_part(size_t partition_size, bool split, bool realloc)
  92 {
  93   return first_part(partition_size, alignment(), split, realloc);
  94 }
  95 
  96 ReservedSpace ReservedSpace::last_part(size_t partition_size)
  97 {
  98   return last_part(partition_size, alignment());
  99 }
 100 
 101 // Class encapsulating behavior specific of memory space reserved for Java heap.
 102 class ReservedHeapSpace : public ReservedSpace {
 103  private:
 104   void try_reserve_heap(size_t size, size_t alignment, bool large,
 105                         char *requested_address);
 106   void try_reserve_range(char *highest_start, char *lowest_start,
 107                          size_t attach_point_alignment, char *aligned_HBMA,




  64   char*  base()            const { return _base;      }
  65   size_t size()            const { return _size;      }
  66   size_t alignment()       const { return _alignment; }
  67   bool   special()         const { return _special;   }
  68   bool   executable()      const { return _executable;   }
  69   size_t noaccess_prefix() const { return _noaccess_prefix;   }
  70   bool is_reserved()       const { return _base != NULL; }
  71   void release();
  72 
  73   // Splitting
  74   ReservedSpace first_part(size_t partition_size, size_t alignment,
  75                            bool split = false, bool realloc = true);
  76   ReservedSpace last_part (size_t partition_size, size_t alignment);
  77 
  78   // These simply call the above using the default alignment.
  79   inline ReservedSpace first_part(size_t partition_size,
  80                                   bool split = false, bool realloc = true);
  81   inline ReservedSpace last_part (size_t partition_size);
  82 
  83   // Alignment
  84   static size_t page_align_up(size_t size);
  85   static size_t page_align_down(size_t size);
  86   static size_t allocation_align_up(size_t size);
  87   static size_t allocation_align_down(size_t size);
  88 };
  89 
  90 ReservedSpace
  91 ReservedSpace::first_part(size_t partition_size, bool split, bool realloc)
  92 {
  93   return first_part(partition_size, alignment(), split, realloc);
  94 }
  95 
  96 ReservedSpace ReservedSpace::last_part(size_t partition_size)
  97 {
  98   return last_part(partition_size, alignment());
  99 }
 100 
 101 // Class encapsulating behavior specific of memory space reserved for Java heap.
 102 class ReservedHeapSpace : public ReservedSpace {
 103  private:
 104   void try_reserve_heap(size_t size, size_t alignment, bool large,
 105                         char *requested_address);
 106   void try_reserve_range(char *highest_start, char *lowest_start,
 107                          size_t attach_point_alignment, char *aligned_HBMA,


< prev index next >