equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
23 */ |
23 */ |
24 |
24 |
25 #ifndef SHARE_VM_GC_CMS_FREECHUNK_HPP |
25 #ifndef SHARE_VM_GC_CMS_FREECHUNK_HPP |
26 #define SHARE_VM_GC_CMS_FREECHUNK_HPP |
26 #define SHARE_VM_GC_CMS_FREECHUNK_HPP |
27 |
27 |
28 #include "memory/allocation.hpp" |
|
29 #include "memory/memRegion.hpp" |
28 #include "memory/memRegion.hpp" |
30 #include "oops/markOop.hpp" |
29 #include "oops/markOop.hpp" |
31 #include "runtime/mutex.hpp" |
30 #include "runtime/mutex.hpp" |
32 #include "runtime/orderAccess.hpp" |
31 #include "runtime/orderAccess.hpp" |
33 #include "utilities/debug.hpp" |
32 #include "utilities/debug.hpp" |
53 // don't have their LSB set. The corresponding bit in the CMSBitMap is |
52 // don't have their LSB set. The corresponding bit in the CMSBitMap is |
54 // set when the chunk is allocated. There are also blocks that "look free" |
53 // set when the chunk is allocated. There are also blocks that "look free" |
55 // but are not part of the free list and should not be coalesced into larger |
54 // but are not part of the free list and should not be coalesced into larger |
56 // free blocks. These free blocks have their two LSB's set. |
55 // free blocks. These free blocks have their two LSB's set. |
57 |
56 |
58 class FreeChunk VALUE_OBJ_CLASS_SPEC { |
57 class FreeChunk { |
59 friend class VMStructs; |
58 friend class VMStructs; |
60 // For 64 bit compressed oops, the markOop encodes both the size and the |
59 // For 64 bit compressed oops, the markOop encodes both the size and the |
61 // indication that this is a FreeChunk and not an object. |
60 // indication that this is a FreeChunk and not an object. |
62 volatile size_t _size; |
61 volatile size_t _size; |
63 FreeChunk* _prev; |
62 FreeChunk* _prev; |