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

Side by Side Diff: sky/engine/platform/heap/Heap.h

Issue 678003003: Begin to remove heap/* (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/platform/heap/Handle.h ('k') | sky/engine/platform/heap/Heap.cpp » ('j') | no next file with comments »
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 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 1043
1044 int m_numberOfNormalPages; 1044 int m_numberOfNormalPages;
1045 1045
1046 // The promptly freed count contains the number of promptly freed objects 1046 // The promptly freed count contains the number of promptly freed objects
1047 // since the last sweep or since it was manually reset to delay coalescing. 1047 // since the last sweep or since it was manually reset to delay coalescing.
1048 size_t m_promptlyFreedCount; 1048 size_t m_promptlyFreedCount;
1049 }; 1049 };
1050 1050
1051 class PLATFORM_EXPORT Heap { 1051 class PLATFORM_EXPORT Heap {
1052 public: 1052 public:
1053 static void init();
1054 static void shutdown();
1055 static void doShutdown();
1056
1057 static BaseHeapPage* contains(Address); 1053 static BaseHeapPage* contains(Address);
1058 static BaseHeapPage* contains(void* pointer) { return contains(reinterpret_c ast<Address>(pointer)); } 1054 static BaseHeapPage* contains(void* pointer) { return contains(reinterpret_c ast<Address>(pointer)); }
1059 static BaseHeapPage* contains(const void* pointer) { return contains(const_c ast<void*>(pointer)); } 1055 static BaseHeapPage* contains(const void* pointer) { return contains(const_c ast<void*>(pointer)); }
1060 #if ENABLE(ASSERT) 1056 #if ENABLE(ASSERT)
1061 static bool containedInHeapOrOrphanedPage(void*); 1057 static bool containedInHeapOrOrphanedPage(void*);
1062 #endif 1058 #endif
1063 1059
1064 // Push a trace callback on the marking stack. 1060 // Push a trace callback on the marking stack.
1065 static void pushTraceCallback(CallbackStack**, void* containerObject, TraceC allback); 1061 static void pushTraceCallback(CallbackStack**, void* containerObject, TraceC allback);
1066 1062
(...skipping 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after
2534 }; 2530 };
2535 2531
2536 template<typename T> 2532 template<typename T>
2537 struct IfWeakMember<WeakMember<T> > { 2533 struct IfWeakMember<WeakMember<T> > {
2538 static bool isDead(Visitor* visitor, const WeakMember<T>& t) { return !visit or->isAlive(t.get()); } 2534 static bool isDead(Visitor* visitor, const WeakMember<T>& t) { return !visit or->isAlive(t.get()); }
2539 }; 2535 };
2540 2536
2541 } 2537 }
2542 2538
2543 #endif // Heap_h 2539 #endif // Heap_h
OLDNEW
« no previous file with comments | « sky/engine/platform/heap/Handle.h ('k') | sky/engine/platform/heap/Heap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698