< prev index next >

src/hotspot/os/windows/gc/z/zBackingFile_windows.cpp

Print this page




  22  */
  23 
  24 #include "precompiled.hpp"
  25 #include "gc/z/zBackingFile_windows.hpp"
  26 #include "gc/z/zGlobals.hpp"
  27 #include "gc/z/zGranuleMap.inline.hpp"
  28 #include "gc/z/zMapper_windows.hpp"
  29 #include "logging/log.hpp"
  30 #include "runtime/globals.hpp"
  31 #include "utilities/debug.hpp"
  32 
  33 // The backing file commits and uncommits physical memory, that can be
  34 // multi-mapped into the virtual address space. To support fine-graned
  35 // committing and uncommitting, each ZGranuleSize chunked is mapped to
  36 // a separate paging file mapping.
  37 
  38 ZBackingFile::ZBackingFile() :
  39     _handles(MaxHeapSize),
  40     _size(0) {}
  41 








  42 size_t ZBackingFile::size() const {
  43   return _size;
  44 }
  45 
  46 HANDLE ZBackingFile::get_handle(uintptr_t offset) const {
  47   HANDLE const handle = _handles.get(offset);
  48   assert(handle != 0, "Should be set");
  49   return handle;
  50 }
  51 
  52 void ZBackingFile::put_handle(uintptr_t offset, HANDLE handle) {
  53   assert(handle != INVALID_HANDLE_VALUE, "Invalid handle");
  54   assert(_handles.get(offset) == 0, "Should be cleared");
  55   _handles.put(offset, handle);
  56 }
  57 
  58 void ZBackingFile::clear_handle(uintptr_t offset) {
  59   assert(_handles.get(offset) != 0, "Should be set");
  60   _handles.put(offset, 0);
  61 }




  22  */
  23 
  24 #include "precompiled.hpp"
  25 #include "gc/z/zBackingFile_windows.hpp"
  26 #include "gc/z/zGlobals.hpp"
  27 #include "gc/z/zGranuleMap.inline.hpp"
  28 #include "gc/z/zMapper_windows.hpp"
  29 #include "logging/log.hpp"
  30 #include "runtime/globals.hpp"
  31 #include "utilities/debug.hpp"
  32 
  33 // The backing file commits and uncommits physical memory, that can be
  34 // multi-mapped into the virtual address space. To support fine-graned
  35 // committing and uncommitting, each ZGranuleSize chunked is mapped to
  36 // a separate paging file mapping.
  37 
  38 ZBackingFile::ZBackingFile() :
  39     _handles(MaxHeapSize),
  40     _size(0) {}
  41 
  42 bool ZBackingFile::is_initialized() const {
  43   return true;
  44 }
  45 
  46 void ZBackingFile::warn_commit_limits(size_t max) const {
  47   // Does nothing
  48 }
  49 
  50 size_t ZBackingFile::size() const {
  51   return _size;
  52 }
  53 
  54 HANDLE ZBackingFile::get_handle(uintptr_t offset) const {
  55   HANDLE const handle = _handles.get(offset);
  56   assert(handle != 0, "Should be set");
  57   return handle;
  58 }
  59 
  60 void ZBackingFile::put_handle(uintptr_t offset, HANDLE handle) {
  61   assert(handle != INVALID_HANDLE_VALUE, "Invalid handle");
  62   assert(_handles.get(offset) == 0, "Should be cleared");
  63   _handles.put(offset, handle);
  64 }
  65 
  66 void ZBackingFile::clear_handle(uintptr_t offset) {
  67   assert(_handles.get(offset) != 0, "Should be set");
  68   _handles.put(offset, 0);
  69 }


< prev index next >