comparison src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp @ 356:1ee8caae33af

Merge
author tonyp
date Thu, 21 Aug 2008 23:36:31 -0400
parents 850fdf70db2b
children 06df86c2ec37
comparison
equal deleted inserted replaced
355:0edda524b58c 356:1ee8caae33af
1 /* 1 /*
2 * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. 2 * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
106 106
107 // The main part of the heap (old gen + young gen) can often use a larger page 107 // The main part of the heap (old gen + young gen) can often use a larger page
108 // size than is needed or wanted for the perm gen. Use the "compound 108 // size than is needed or wanted for the perm gen. Use the "compound
109 // alignment" ReservedSpace ctor to avoid having to use the same page size for 109 // alignment" ReservedSpace ctor to avoid having to use the same page size for
110 // all gens. 110 // all gens.
111 ReservedSpace heap_rs(pg_max_size, pg_align, og_max_size + yg_max_size, 111 ReservedHeapSpace heap_rs(pg_max_size, pg_align, og_max_size + yg_max_size,
112 og_align); 112 og_align);
113 os::trace_page_sizes("ps perm", pg_min_size, pg_max_size, pg_page_sz, 113 os::trace_page_sizes("ps perm", pg_min_size, pg_max_size, pg_page_sz,
114 heap_rs.base(), pg_max_size); 114 heap_rs.base(), pg_max_size);
115 os::trace_page_sizes("ps main", og_min_size + yg_min_size, 115 os::trace_page_sizes("ps main", og_min_size + yg_min_size,
116 og_max_size + yg_max_size, og_page_sz, 116 og_max_size + yg_max_size, og_page_sz,
117 heap_rs.base() + pg_max_size, 117 heap_rs.base() + pg_max_size,
936 } 936 }
937 937
938 // Delegate the resize to the generation. 938 // Delegate the resize to the generation.
939 _old_gen->resize(desired_free_space); 939 _old_gen->resize(desired_free_space);
940 } 940 }
941
942 #ifndef PRODUCT
943 void ParallelScavengeHeap::record_gen_tops_before_GC() {
944 if (ZapUnusedHeapArea) {
945 young_gen()->record_spaces_top();
946 old_gen()->record_spaces_top();
947 perm_gen()->record_spaces_top();
948 }
949 }
950
951 void ParallelScavengeHeap::gen_mangle_unused_area() {
952 if (ZapUnusedHeapArea) {
953 young_gen()->eden_space()->mangle_unused_area();
954 young_gen()->to_space()->mangle_unused_area();
955 young_gen()->from_space()->mangle_unused_area();
956 old_gen()->object_space()->mangle_unused_area();
957 perm_gen()->object_space()->mangle_unused_area();
958 }
959 }
960 #endif