mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
6700789: G1: Enable use of compressed oops with G1 heaps
Modifications to G1 so as to allow the use of compressed oops. Reviewed-by: apetrusenko, coleenp, jmasa, kvn, never, phh, tonyp
This commit is contained in:
parent
50d7db1805
commit
075c1335cb
58 changed files with 1233 additions and 1175 deletions
|
@ -560,8 +560,14 @@ typedef GenericTaskQueueSet<Task> OopTaskQueueSet;
|
|||
class StarTask {
|
||||
void* _holder; // either union oop* or narrowOop*
|
||||
public:
|
||||
StarTask(narrowOop *p) { _holder = (void *)((uintptr_t)p | COMPRESSED_OOP_MASK); }
|
||||
StarTask(oop *p) { _holder = (void*)p; }
|
||||
StarTask(narrowOop* p) {
|
||||
assert(((uintptr_t)p & COMPRESSED_OOP_MASK) == 0, "Information loss!");
|
||||
_holder = (void *)((uintptr_t)p | COMPRESSED_OOP_MASK);
|
||||
}
|
||||
StarTask(oop* p) {
|
||||
assert(((uintptr_t)p & COMPRESSED_OOP_MASK) == 0, "Information loss!");
|
||||
_holder = (void*)p;
|
||||
}
|
||||
StarTask() { _holder = NULL; }
|
||||
operator oop*() { return (oop*)_holder; }
|
||||
operator narrowOop*() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue