Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/heapRegionSet.inline.hpp @ 6010:720b6a76dd9d
7157073: G1: type change size_t -> uint for region counts / indexes
Summary: Change the type of fields / variables / etc. that represent region counts and indeces from size_t to uint.
Reviewed-by: iveresov, brutisso, jmasa, jwilhelm
author | tonyp |
---|---|
date | Wed, 18 Apr 2012 07:21:15 -0400 |
parents | 3be7439273c5 |
children | a2f7274eb6ef |
comparison
equal
deleted
inserted
replaced
6009:dde53abda3d6 | 6010:720b6a76dd9d |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2011, 2012, 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. |
52 inline void HeapRegionSetBase::update_for_removal(HeapRegion* hr) { | 52 inline void HeapRegionSetBase::update_for_removal(HeapRegion* hr) { |
53 // Assumes the caller has already verified the region. | 53 // Assumes the caller has already verified the region. |
54 assert(_length > 0, hrs_ext_msg(this, "pre-condition")); | 54 assert(_length > 0, hrs_ext_msg(this, "pre-condition")); |
55 _length -= 1; | 55 _length -= 1; |
56 | 56 |
57 size_t region_num_diff; | 57 uint region_num_diff; |
58 if (!hr->isHumongous()) { | 58 if (!hr->isHumongous()) { |
59 region_num_diff = 1; | 59 region_num_diff = 1; |
60 } else { | 60 } else { |
61 region_num_diff = calculate_region_num(hr); | 61 region_num_diff = calculate_region_num(hr); |
62 } | 62 } |
63 assert(region_num_diff <= _region_num, | 63 assert(region_num_diff <= _region_num, |
64 hrs_err_msg("[%s] region's region num: "SIZE_FORMAT" " | 64 hrs_err_msg("[%s] region's region num: %u " |
65 "should be <= region num: "SIZE_FORMAT, | 65 "should be <= region num: %u", |
66 name(), region_num_diff, _region_num)); | 66 name(), region_num_diff, _region_num)); |
67 _region_num -= region_num_diff; | 67 _region_num -= region_num_diff; |
68 | 68 |
69 size_t used_bytes = hr->used(); | 69 size_t used_bytes = hr->used(); |
70 assert(used_bytes <= _total_used_bytes, | 70 assert(used_bytes <= _total_used_bytes, |