< prev index next >

src/hotspot/share/gc/z/zVirtualMemory.inline.hpp

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -49,18 +49,11 @@
 
 inline size_t ZVirtualMemory::size() const {
   return _end - _start;
 }
 
-inline ZVirtualMemory ZVirtualMemory::split(size_t split_size) {
-  assert(split_size <= size(), "precondition");
-  ZVirtualMemory mem(_start, split_size);
-  _start += split_size;
-  return mem;
-}
-
-inline void ZVirtualMemory::clear() {
-  _start = UINTPTR_MAX;
-  _end = UINTPTR_MAX;
+inline ZVirtualMemory ZVirtualMemory::split(size_t size) {
+  _start += size;
+  return ZVirtualMemory(_start - size, size);
 }
 
 #endif // SHARE_GC_Z_ZVIRTUALMEMORY_INLINE_HPP
< prev index next >