Chromium Code Reviews| 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 const GCInfo* info = s_gcInfoTable[gcInfoIndex]; |
|
haraken
2015/01/06 08:08:04
Add ASSERT(s_gcInfoTable)
sof
2015/01/06 08:19:18
Done.
| |
| 938 ASSERT(info); | 938 ASSERT(info); |
| 939 return info; | 939 return info; |
| 940 } | 940 } |
| 941 | 941 |
| 942 static void increaseAllocatedObjectSize(size_t delta) { atomicAdd(&s_allocat edObjectSize, static_cast<long>(delta)); } | 942 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)); } | 943 static void decreaseAllocatedObjectSize(size_t delta) { atomicSubtract(&s_al locatedObjectSize, static_cast<long>(delta)); } |
| 944 static size_t allocatedObjectSize() { return acquireLoad(&s_allocatedObjectS ize); } | 944 static size_t allocatedObjectSize() { return acquireLoad(&s_allocatedObjectS ize); } |
| 945 static void increaseMarkedObjectSize(size_t delta) { atomicAdd(&s_markedObje ctSize, static_cast<long>(delta)); } | 945 static void increaseMarkedObjectSize(size_t delta) { atomicAdd(&s_markedObje ctSize, static_cast<long>(delta)); } |
| 946 static size_t markedObjectSize() { return acquireLoad(&s_markedObjectSize); } | 946 static size_t markedObjectSize() { return acquireLoad(&s_markedObjectSize); } |
| 947 static void increaseAllocatedSpace(size_t delta) { atomicAdd(&s_allocatedSpa ce, static_cast<long>(delta)); } | 947 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> | 2417 template<typename T, size_t inlineCapacity> |
| 2418 struct GCInfoTrait<HeapVector<T, inlineCapacity>> : public GCInfoTrait<Vector<T, inlineCapacity, HeapAllocator>> { }; | 2418 struct GCInfoTrait<HeapVector<T, inlineCapacity>> : public GCInfoTrait<Vector<T, inlineCapacity, HeapAllocator>> { }; |
| 2419 template<typename T, size_t inlineCapacity> | 2419 template<typename T, size_t inlineCapacity> |
| 2420 struct GCInfoTrait<HeapDeque<T, inlineCapacity>> : public GCInfoTrait<Deque<T, i nlineCapacity, HeapAllocator>> { }; | 2420 struct GCInfoTrait<HeapDeque<T, inlineCapacity>> : public GCInfoTrait<Deque<T, i nlineCapacity, HeapAllocator>> { }; |
| 2421 template<typename T, typename U, typename V> | 2421 template<typename T, typename U, typename V> |
| 2422 struct GCInfoTrait<HeapHashCountedSet<T, U, V>> : public GCInfoTrait<HashCounted Set<T, U, V, HeapAllocator>> { }; | 2422 struct GCInfoTrait<HeapHashCountedSet<T, U, V>> : public GCInfoTrait<HashCounted Set<T, U, V, HeapAllocator>> { }; |
| 2423 | 2423 |
| 2424 } // namespace blink | 2424 } // namespace blink |
| 2425 | 2425 |
| 2426 #endif // Heap_h | 2426 #endif // Heap_h |
| OLD | NEW |