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 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
927 // provide an efficient mapping from arbitrary addresses to the containing | 927 // provide an efficient mapping from arbitrary addresses to the containing |
928 // heap-page if one exists. | 928 // heap-page if one exists. |
929 static BaseHeapPage* lookup(Address); | 929 static BaseHeapPage* lookup(Address); |
930 static void addPageMemoryRegion(PageMemoryRegion*); | 930 static void addPageMemoryRegion(PageMemoryRegion*); |
931 static void removePageMemoryRegion(PageMemoryRegion*); | 931 static void removePageMemoryRegion(PageMemoryRegion*); |
932 | 932 |
933 static const GCInfo* gcInfo(size_t gcInfoIndex) | 933 static const GCInfo* gcInfo(size_t gcInfoIndex) |
934 { | 934 { |
935 ASSERT(gcInfoIndex >= 1); | 935 ASSERT(gcInfoIndex >= 1); |
936 ASSERT(gcInfoIndex < gcInfoIndexMax); | 936 ASSERT(gcInfoIndex < gcInfoIndexMax); |
937 const GCInfo* info = s_gcInfoMap[gcInfoIndex]; | 937 ASSERT(s_gcInfoTable); |
| 938 const GCInfo* info = s_gcInfoTable[gcInfoIndex]; |
938 ASSERT(info); | 939 ASSERT(info); |
939 return info; | 940 return info; |
940 } | 941 } |
941 | 942 |
942 static void increaseAllocatedObjectSize(size_t delta) { atomicAdd(&s_allocat
edObjectSize, static_cast<long>(delta)); } | 943 static void increaseAllocatedObjectSize(size_t delta) { atomicAdd(&s_allocat
edObjectSize, static_cast<long>(delta)); } |
943 static void decreaseAllocatedObjectSize(size_t delta) { atomicSubtract(&s_al
locatedObjectSize, static_cast<long>(delta)); } | 944 static void decreaseAllocatedObjectSize(size_t delta) { atomicSubtract(&s_al
locatedObjectSize, static_cast<long>(delta)); } |
944 static size_t allocatedObjectSize() { return acquireLoad(&s_allocatedObjectS
ize); } | 945 static size_t allocatedObjectSize() { return acquireLoad(&s_allocatedObjectS
ize); } |
945 static void increaseMarkedObjectSize(size_t delta) { atomicAdd(&s_markedObje
ctSize, static_cast<long>(delta)); } | 946 static void increaseMarkedObjectSize(size_t delta) { atomicAdd(&s_markedObje
ctSize, static_cast<long>(delta)); } |
946 static size_t markedObjectSize() { return acquireLoad(&s_markedObjectSize);
} | 947 static size_t markedObjectSize() { return acquireLoad(&s_markedObjectSize);
} |
947 static void increaseAllocatedSpace(size_t delta) { atomicAdd(&s_allocatedSpa
ce, static_cast<long>(delta)); } | 948 static void increaseAllocatedSpace(size_t delta) { atomicAdd(&s_allocatedSpa
ce, static_cast<long>(delta)); } |
(...skipping 1469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2417 template<typename T, size_t inlineCapacity> | 2418 template<typename T, size_t inlineCapacity> |
2418 struct GCInfoTrait<HeapVector<T, inlineCapacity>> : public GCInfoTrait<Vector<T,
inlineCapacity, HeapAllocator>> { }; | 2419 struct GCInfoTrait<HeapVector<T, inlineCapacity>> : public GCInfoTrait<Vector<T,
inlineCapacity, HeapAllocator>> { }; |
2419 template<typename T, size_t inlineCapacity> | 2420 template<typename T, size_t inlineCapacity> |
2420 struct GCInfoTrait<HeapDeque<T, inlineCapacity>> : public GCInfoTrait<Deque<T, i
nlineCapacity, HeapAllocator>> { }; | 2421 struct GCInfoTrait<HeapDeque<T, inlineCapacity>> : public GCInfoTrait<Deque<T, i
nlineCapacity, HeapAllocator>> { }; |
2421 template<typename T, typename U, typename V> | 2422 template<typename T, typename U, typename V> |
2422 struct GCInfoTrait<HeapHashCountedSet<T, U, V>> : public GCInfoTrait<HashCounted
Set<T, U, V, HeapAllocator>> { }; | 2423 struct GCInfoTrait<HeapHashCountedSet<T, U, V>> : public GCInfoTrait<HashCounted
Set<T, U, V, HeapAllocator>> { }; |
2423 | 2424 |
2424 } // namespace blink | 2425 } // namespace blink |
2425 | 2426 |
2426 #endif // Heap_h | 2427 #endif // Heap_h |
OLD | NEW |