bitMap.cpp revision 3659
2362N/A * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA // With a valid range (beg <= end), this test ensures that end != 0, as // required by inverted_bit_mask_for_range. Also avoids an unnecessary write. // With a valid range (beg <= end), this test ensures that end != 0, as // required by inverted_bit_mask_for_range. Also avoids an unnecessary write. // With a valid range (beg <= end), this test ensures that end != 0, as // required by inverted_bit_mask_for_range. Also avoids an unnecessary write. // The range includes at least one full word. // The range spans at most 2 partial words. // The range includes at least one full word. // The range spans at most 2 partial words. "the range must include at least 32 bytes");
// The range includes at least one full word. "the range must include at least 32 bytes");
// The range includes at least one full word. // Return true to indicate that this thread changed // the bit, false to indicate that someone else did. // In either case, the requested bit is in the // requested state some time during the period that // this thread is executing this call. More importantly, // if no other thread is executing an action to // change the requested bit to a state other than // the one that this thread is trying to set it to, // then the the bit is in the expected state // at exit from this method. However, rather than // make such a strong assertion here, based on // assuming such constrained use (which though true // today, could change in the future to service some // funky parallel algorithm), we encourage callers // to do such verification, as and when appropriate. // The range includes at least one full word. // The range spans at most 2 partial words. "the range must include at least 32 bytes");
// The range includes at least one full word. // If this has more bits set than dest_map[index], then other is not a // Otherwise, no intersection. // XXX Ideally, we would remove this restriction. "Only handle aligned cases so far.");
// Note that if the closure itself modifies the bitmap // then modifications in and to the left of the _bit_ being // currently sampled will not be seen. Note also that the // interval [leftOffset, rightOffset) is right open. // resample at each closure application // (see, for instance, CMS bug 4525989) for (
uint i = 0; i <
256; i++) {
typedef unsigned char uchar;