Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp @ 6725:da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author | coleenp |
---|---|
date | Sat, 01 Sep 2012 13:25:18 -0400 |
parents | d2a62e0f25eb |
children | 2fc0334f613a |
comparison
equal
deleted
inserted
replaced
6724:36d1d483d5d6 | 6725:da91efe96a93 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2001, 2011, 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. |
380 // query, by updating entries as we cross them. | 380 // query, by updating entries as we cross them. |
381 | 381 |
382 // If the fist object's end q is at the card boundary. Start refining | 382 // If the fist object's end q is at the card boundary. Start refining |
383 // with the corresponding card (the value of the entry will be basically | 383 // with the corresponding card (the value of the entry will be basically |
384 // set to 0). If the object crosses the boundary -- start from the next card. | 384 // set to 0). If the object crosses the boundary -- start from the next card. |
385 size_t n_index = _array->index_for(n); | |
385 size_t next_index = _array->index_for(n) + !_array->is_card_boundary(n); | 386 size_t next_index = _array->index_for(n) + !_array->is_card_boundary(n); |
386 HeapWord* next_boundary = _array->address_for_index(next_index); | 387 // Calculate a consistent next boundary. If "n" is not at the boundary |
388 // already, step to the boundary. | |
389 HeapWord* next_boundary = _array->address_for_index(n_index) + | |
390 (n_index == next_index ? 0 : N_words); | |
391 assert(next_boundary <= _array->_end, | |
392 err_msg("next_boundary is beyond the end of the covered region " | |
393 " next_boundary " PTR_FORMAT " _array->_end " PTR_FORMAT, | |
394 next_boundary, _array->_end)); | |
387 if (csp() != NULL) { | 395 if (csp() != NULL) { |
388 if (addr >= csp()->top()) return csp()->top(); | 396 if (addr >= csp()->top()) return csp()->top(); |
389 while (next_boundary < addr) { | 397 while (next_boundary < addr) { |
390 while (n <= next_boundary) { | 398 while (n <= next_boundary) { |
391 q = n; | 399 q = n; |