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

Unified Diff: src/gpu/GrMemoryPool.h

Issue 1562813002: Add sentinel to GrMemoryPool's block header (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/gpu/GrMemoryPool.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrMemoryPool.h
diff --git a/src/gpu/GrMemoryPool.h b/src/gpu/GrMemoryPool.h
index 1dd1732ea97edad53115cc835a639b81a1eaf3a7..43826d354a134f8d7bcbf667e395cb2095194fd0 100644
--- a/src/gpu/GrMemoryPool.h
+++ b/src/gpu/GrMemoryPool.h
@@ -58,6 +58,9 @@ private:
void validate();
struct BlockHeader {
+#ifdef SK_DEBUG
+ uint32_t fBlockSentinal; ///< known value to check for bad back pointers to blocks
+#endif
BlockHeader* fNext; ///< doubly-linked list of blocks.
BlockHeader* fPrev;
int fLiveCount; ///< number of outstanding allocations in the
« no previous file with comments | « no previous file | src/gpu/GrMemoryPool.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698