293 // the newly allocated space, if possible, returning the result (or NULL if |
293 // the newly allocated space, if possible, returning the result (or NULL if |
294 // the allocation failed). |
294 // the allocation failed). |
295 // |
295 // |
296 // The "obj_size" argument is just obj->size(), passed along so the caller can |
296 // The "obj_size" argument is just obj->size(), passed along so the caller can |
297 // avoid repeating the virtual call to retrieve it. |
297 // avoid repeating the virtual call to retrieve it. |
298 // |
298 virtual oop promote(oop obj, size_t obj_size); |
299 // The "ref" argument, if non-NULL, is the address of some reference to "obj" |
|
300 // (that is "*ref == obj"); some generations may use this information to, for |
|
301 // example, influence placement decisions. |
|
302 // |
|
303 // The default implementation ignores "ref" and calls allocate(). |
|
304 virtual oop promote(oop obj, size_t obj_size, oop* ref); |
|
305 |
299 |
306 // Thread "thread_num" (0 <= i < ParalleGCThreads) wants to promote |
300 // Thread "thread_num" (0 <= i < ParalleGCThreads) wants to promote |
307 // object "obj", whose original mark word was "m", and whose size is |
301 // object "obj", whose original mark word was "m", and whose size is |
308 // "word_sz". If possible, allocate space for "obj", copy obj into it |
302 // "word_sz". If possible, allocate space for "obj", copy obj into it |
309 // (taking care to copy "m" into the mark word when done, since the mark |
303 // (taking care to copy "m" into the mark word when done, since the mark |