Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(434)

Side by Side Diff: Source/platform/heap/Heap.h

Issue 808803007: Allocate GCInfo descriptor table during Oilpan initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/platform/heap/Heap.cpp » ('j') | Source/platform/heap/Heap.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | Source/platform/heap/Heap.cpp » ('j') | Source/platform/heap/Heap.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698