src/share/vm/utilities/copy.hpp

changeset 548
ba764ed4b6f2
parent 435
a61af66fc99e
child 631
d1605aabd0a1
     1.1 --- a/src/share/vm/utilities/copy.hpp	Fri Apr 11 09:56:35 2008 -0400
     1.2 +++ b/src/share/vm/utilities/copy.hpp	Sun Apr 13 17:43:42 2008 -0400
     1.3 @@ -148,11 +148,19 @@
     1.4  
     1.5    // oops,                  conjoint, atomic on each oop
     1.6    static void conjoint_oops_atomic(oop* from, oop* to, size_t count) {
     1.7 -    assert_params_ok(from, to, LogBytesPerOop);
     1.8 +    assert_params_ok(from, to, LogBytesPerHeapOop);
     1.9      assert_non_zero(count);
    1.10      pd_conjoint_oops_atomic(from, to, count);
    1.11    }
    1.12  
    1.13 +  // overloaded for UseCompressedOops
    1.14 +  static void conjoint_oops_atomic(narrowOop* from, narrowOop* to, size_t count) {
    1.15 +    assert(sizeof(narrowOop) == sizeof(jint), "this cast is wrong");
    1.16 +    assert_params_ok(from, to, LogBytesPerInt);
    1.17 +    assert_non_zero(count);
    1.18 +    pd_conjoint_jints_atomic((jint*)from, (jint*)to, count);
    1.19 +  }
    1.20 +
    1.21    // Copy a span of memory.  If the span is an integral number of aligned
    1.22    // longs, words, or ints, copy those units atomically.
    1.23    // The largest atomic transfer unit is 8 bytes, or the largest power
    1.24 @@ -188,7 +196,7 @@
    1.25  
    1.26    // oops,                  conjoint array, atomic on each oop
    1.27    static void arrayof_conjoint_oops(HeapWord* from, HeapWord* to, size_t count) {
    1.28 -    assert_params_ok(from, to, LogBytesPerOop);
    1.29 +    assert_params_ok(from, to, LogBytesPerHeapOop);
    1.30      assert_non_zero(count);
    1.31      pd_arrayof_conjoint_oops(from, to, count);
    1.32    }

mercurial