OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 return allocationSizeFromSize(size) - sizeof(HeapObjectHeader); | 943 return allocationSizeFromSize(size) - sizeof(HeapObjectHeader); |
944 } | 944 } |
945 static Address allocateOnHeapIndex(ThreadState*, size_t, int heapIndex, size
_t gcInfoIndex); | 945 static Address allocateOnHeapIndex(ThreadState*, size_t, int heapIndex, size
_t gcInfoIndex); |
946 template<typename T> static Address allocate(size_t); | 946 template<typename T> static Address allocate(size_t); |
947 template<typename T> static Address reallocate(void* previous, size_t); | 947 template<typename T> static Address reallocate(void* previous, size_t); |
948 | 948 |
949 enum GCReason { | 949 enum GCReason { |
950 IdleGC, | 950 IdleGC, |
951 PreciseGC, | 951 PreciseGC, |
952 ConservativeGC, | 952 ConservativeGC, |
953 ForcedGCForTesting, | 953 ForcedGC, |
954 NumberOfGCReason | 954 NumberOfGCReason |
955 }; | 955 }; |
956 static const char* gcReasonString(GCReason); | 956 static const char* gcReasonString(GCReason); |
957 static void collectGarbage(ThreadState::StackState, ThreadState::GCType, GCR
eason); | 957 static void collectGarbage(ThreadState::StackState, ThreadState::GCType, GCR
eason); |
958 static void collectGarbageForTerminatingThread(ThreadState*); | 958 static void collectGarbageForTerminatingThread(ThreadState*); |
959 static void collectAllGarbage(); | 959 static void collectAllGarbage(); |
960 | 960 |
961 static void processMarkingStack(Visitor*); | 961 static void processMarkingStack(Visitor*); |
962 static void postMarkingProcessing(Visitor*); | 962 static void postMarkingProcessing(Visitor*); |
963 static void globalWeakProcessing(Visitor*); | 963 static void globalWeakProcessing(Visitor*); |
(...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2223 Value* table = reinterpret_cast<Value*>(pointer); | 2223 Value* table = reinterpret_cast<Value*>(pointer); |
2224 for (unsigned i = 0; i < length; ++i) { | 2224 for (unsigned i = 0; i < length; ++i) { |
2225 if (!Table::isEmptyOrDeletedBucket(table[i])) | 2225 if (!Table::isEmptyOrDeletedBucket(table[i])) |
2226 table[i].~Value(); | 2226 table[i].~Value(); |
2227 } | 2227 } |
2228 } | 2228 } |
2229 | 2229 |
2230 } // namespace blink | 2230 } // namespace blink |
2231 | 2231 |
2232 #endif // Heap_h | 2232 #endif // Heap_h |
OLD | NEW |