3198N/A * Copyright (c) 2002, 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. 1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A// psPromotionManager is used by a single thread to manage object survival 0N/A// during a scavenge. The promotion manager contains thread local data only. 4141N/A// NOTE! Be careful when allocating the stacks on cheap. If you are going 0N/A// to use a promotion manager in more than one thread, the stacks MUST be 0N/A// on cheap. This can lead to memory leaks, though, as they are not auto 0N/A// Move to some global location 0N/A// End move to some global location 0N/A // On the task queues we push reference locations as well as 0N/A // partially-scanned arrays (in the latter case, we push an oop to 0N/A // the from-space image of the array and the length on the 0N/A // from-space image indicates how many entries on the array we still 0N/A // need to scan; this is basically how ParNew does partial array 0N/A // scanning too). To be able to distinguish between reference 0N/A // locations and partially-scanned array oops we simply mask the 0N/A // latter oops with 0x01. The next three methods do the masking, 0N/A // unmasking, and checking whether the oop is masked or not. Notice 0N/A // that the signature of the mask and unmask methods looks a bit 0N/A // strange, as they accept and return different types (oop and 0N/A // oop*). This is because of the difference in types between what 0N/A // the task queue holds (oop*) and oops to partially-scanned arrays 0N/A // (oop). We do all the necessary casting in the mask / unmask 0N/A // methods to avoid sprinkling the rest of the code with more casts. 113N/A // These are added to the taskqueue so PS_CHUNKED_ARRAY_OOP_MASK (or any 113N/A // future masks) can't conflict with COMPRESSED_OOP_MASK 113N/A // If something is marked chunked it's always treated like wide oop* 0N/A // Promotion methods 1879N/A#
endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSPROMOTIONMANAGER_HPP