hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp
changeset 8321 a416df5e4dad
parent 7397 5b173b4ca846
child 9935 51267b5e1a3d
equal deleted inserted replaced
8320:544210b4dd48 8321:a416df5e4dad
     1 /*
     1 /*
     2  * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2001, 2011, Oracle and/or its affiliates. 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.
   110   size_t yg_cur_size =
   110   size_t yg_cur_size =
   111     align_size_up(_collector_policy->young_gen_size(), yg_align);
   111     align_size_up(_collector_policy->young_gen_size(), yg_align);
   112   yg_cur_size = MAX2(yg_cur_size, yg_min_size);
   112   yg_cur_size = MAX2(yg_cur_size, yg_min_size);
   113 
   113 
   114   og_min_size = align_size_up(og_min_size, og_align);
   114   og_min_size = align_size_up(og_min_size, og_align);
   115   og_max_size = align_size_up(og_max_size, og_align);
   115   // Align old gen size down to preserve specified heap size.
       
   116   assert(og_align == yg_align, "sanity");
       
   117   og_max_size = align_size_down(og_max_size, og_align);
       
   118   og_max_size = MAX2(og_max_size, og_min_size);
   116   size_t og_cur_size =
   119   size_t og_cur_size =
   117     align_size_up(_collector_policy->old_gen_size(), og_align);
   120     align_size_down(_collector_policy->old_gen_size(), og_align);
   118   og_cur_size = MAX2(og_cur_size, og_min_size);
   121   og_cur_size = MAX2(og_cur_size, og_min_size);
   119 
   122 
   120   pg_min_size = align_size_up(pg_min_size, pg_align);
   123   pg_min_size = align_size_up(pg_min_size, pg_align);
   121   pg_max_size = align_size_up(pg_max_size, pg_align);
   124   pg_max_size = align_size_up(pg_max_size, pg_align);
   122   size_t pg_cur_size = pg_min_size;
   125   size_t pg_cur_size = pg_min_size;