Mercurial > hg > truffle
comparison src/share/vm/memory/cardTableRS.cpp @ 10135:5a9fa2ba85f0
8012907: anti-delta fix for 8010992
Summary: anti-delta fix for 8010992 until 8012902 can be fixed
Reviewed-by: acorn, minqi, rdurbin
author | dcubed |
---|---|
date | Sun, 21 Apr 2013 20:41:04 -0700 |
parents | 6f817ce50129 |
children | f9be75d21404 |
comparison
equal
deleted
inserted
replaced
10130:6f817ce50129 | 10135:5a9fa2ba85f0 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2001, 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 } | 52 } |
53 #else | 53 #else |
54 _ct_bs = new CardTableModRefBSForCTRS(whole_heap, max_covered_regions); | 54 _ct_bs = new CardTableModRefBSForCTRS(whole_heap, max_covered_regions); |
55 #endif | 55 #endif |
56 set_bs(_ct_bs); | 56 set_bs(_ct_bs); |
57 _last_cur_val_in_gen = NEW_C_HEAP_ARRAY3(jbyte, GenCollectedHeap::max_gens + 1, | 57 _last_cur_val_in_gen = new jbyte[GenCollectedHeap::max_gens + 1]; |
58 mtGC, 0, AllocFailStrategy::RETURN_NULL); | |
59 if (_last_cur_val_in_gen == NULL) { | 58 if (_last_cur_val_in_gen == NULL) { |
60 vm_exit_during_initialization("Could not create last_cur_val_in_gen array."); | 59 vm_exit_during_initialization("Could not last_cur_val_in_gen array."); |
61 } | 60 } |
62 for (int i = 0; i < GenCollectedHeap::max_gens + 1; i++) { | 61 for (int i = 0; i < GenCollectedHeap::max_gens + 1; i++) { |
63 _last_cur_val_in_gen[i] = clean_card_val(); | 62 _last_cur_val_in_gen[i] = clean_card_val(); |
64 } | 63 } |
65 _ct_bs->set_CTRS(this); | 64 _ct_bs->set_CTRS(this); |
66 } | |
67 | |
68 CardTableRS::~CardTableRS() { | |
69 if (_ct_bs) { | |
70 delete _ct_bs; | |
71 _ct_bs = NULL; | |
72 } | |
73 if (_last_cur_val_in_gen) { | |
74 FREE_C_HEAP_ARRAY(jbyte, _last_cur_val_in_gen, mtInternal); | |
75 } | |
76 } | 65 } |
77 | 66 |
78 void CardTableRS::resize_covered_region(MemRegion new_region) { | 67 void CardTableRS::resize_covered_region(MemRegion new_region) { |
79 _ct_bs->resize_covered_region(new_region); | 68 _ct_bs->resize_covered_region(new_region); |
80 } | 69 } |