src/share/vm/utilities/copy.hpp

changeset 1934
e9ff18c4ace7
parent 1907
c18cbe5936b8
parent 1926
2d127394260e
child 1958
d93949c5bdcc
     1.1 --- a/src/share/vm/utilities/copy.hpp	Tue Jun 01 11:48:33 2010 -0700
     1.2 +++ b/src/share/vm/utilities/copy.hpp	Wed Jun 02 22:45:42 2010 -0700
     1.3 @@ -51,7 +51,7 @@
     1.4  class Copy : AllStatic {
     1.5   public:
     1.6    // Block copy methods have four attributes.  We don't define all possibilities.
     1.7 -  //   alignment: aligned according to minimum Java object alignment (MinObjAlignment)
     1.8 +  //   alignment: aligned to BytesPerLong
     1.9    //   arrayof:   arraycopy operation with both operands aligned on the same
    1.10    //              boundary as the first element of an array of the copy unit.
    1.11    //              This is currently a HeapWord boundary on all platforms, except
    1.12 @@ -70,7 +70,7 @@
    1.13    //     [ '_atomic' ]
    1.14    //
    1.15    // Except in the arrayof case, whatever the alignment is, we assume we can copy
    1.16 -  // whole alignment units.  E.g., if MinObjAlignment is 2x word alignment, an odd
    1.17 +  // whole alignment units.  E.g., if BytesPerLong is 2x word alignment, an odd
    1.18    // count may copy an extra word.  In the arrayof case, we are allowed to copy
    1.19    // only the number of copy units specified.
    1.20  
    1.21 @@ -305,17 +305,17 @@
    1.22    }
    1.23    static void assert_params_aligned(HeapWord* from, HeapWord* to) {
    1.24  #ifdef ASSERT
    1.25 -    if (mask_bits((uintptr_t)from, MinObjAlignmentInBytes-1) != 0)
    1.26 -      basic_fatal("not object aligned");
    1.27 -    if (mask_bits((uintptr_t)to, MinObjAlignmentInBytes-1) != 0)
    1.28 -      basic_fatal("not object aligned");
    1.29 +    if (mask_bits((uintptr_t)from, BytesPerLong-1) != 0)
    1.30 +      basic_fatal("not long aligned");
    1.31 +    if (mask_bits((uintptr_t)to, BytesPerLong-1) != 0)
    1.32 +      basic_fatal("not long aligned");
    1.33  #endif
    1.34    }
    1.35  
    1.36    static void assert_params_aligned(HeapWord* to) {
    1.37  #ifdef ASSERT
    1.38 -    if (mask_bits((uintptr_t)to, MinObjAlignmentInBytes-1) != 0)
    1.39 -      basic_fatal("not object aligned");
    1.40 +    if (mask_bits((uintptr_t)to, BytesPerLong-1) != 0)
    1.41 +      basic_fatal("not long aligned");
    1.42  #endif
    1.43    }
    1.44  

mercurial