changeset 7828:566574421b40

8065093: Remove unused variable/output argument Summary: Remove total_reserved from GenCollectedHeap::initialize and ::allocate Reviewed-by: tschatzl, kbarrett Contributed-by: tom.benson@oracle.com
author tschatzl
date Tue, 10 Feb 2015 17:41:19 -0500
parents d040a82e590c
children 73a4afa29510
files src/share/vm/memory/genCollectedHeap.cpp src/share/vm/memory/genCollectedHeap.hpp
diffstat 2 files changed, 6 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/memory/genCollectedHeap.cpp	Tue Feb 10 15:44:42 2015 -0500
+++ b/src/share/vm/memory/genCollectedHeap.cpp	Tue Feb 10 17:41:19 2015 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, 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
@@ -108,12 +108,11 @@
   // Allocate space for the heap.
 
   char* heap_address;
-  size_t total_reserved = 0;
   ReservedSpace heap_rs;
 
   size_t heap_alignment = collector_policy()->heap_alignment();
 
-  heap_address = allocate(heap_alignment, &total_reserved, &heap_rs);
+  heap_address = allocate(heap_alignment, &heap_rs);
 
   if (!heap_rs.is_reserved()) {
     vm_shutdown_during_initialization(
@@ -149,7 +148,6 @@
 
 
 char* GenCollectedHeap::allocate(size_t alignment,
-                                 size_t* _total_reserved,
                                  ReservedSpace* heap_rs){
   const char overflow_msg[] = "The size of the object heap + VM data exceeds "
     "the maximum representable size";
@@ -171,8 +169,6 @@
          err_msg("Gen size; total_reserved=" SIZE_FORMAT ", alignment="
                  SIZE_FORMAT, total_reserved, alignment));
 
-  *_total_reserved = total_reserved;
-
   *heap_rs = Universe::reserve_heap(total_reserved, alignment);
   return heap_rs->base();
 }
--- a/src/share/vm/memory/genCollectedHeap.hpp	Tue Feb 10 15:44:42 2015 -0500
+++ b/src/share/vm/memory/genCollectedHeap.hpp	Tue Feb 10 17:41:19 2015 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, 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
@@ -124,7 +124,9 @@
 
   // Returns JNI_OK on success
   virtual jint initialize();
-  char* allocate(size_t alignment, size_t* _total_reserved, ReservedSpace* heap_rs);
+
+  // Reserve aligned space for the heap as needed by the contained generations.
+  char* allocate(size_t alignment, ReservedSpace* heap_rs);
 
   // Does operations required after initialization has been done.
   void post_initialize();