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

Unified Diff: include/core/SkChunkAlloc.h

Issue 1849183004: MIPS32r2: Fix Chromium runtime crash (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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 | « gyp/common_conditions.gypi ('k') | src/core/SkChunkAlloc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkChunkAlloc.h
diff --git a/include/core/SkChunkAlloc.h b/include/core/SkChunkAlloc.h
index 9699842e6b42a7fab28c9ef8f27fb92fe54fc4d7..bb4ec8faecad9cb499d7156604f836c6549f8d0e 100644
--- a/include/core/SkChunkAlloc.h
+++ b/include/core/SkChunkAlloc.h
@@ -33,7 +33,18 @@ public:
kThrow_AllocFailType
};
+ /**
+ * Allocates a memory block of size bytes.
+ * On success: returns a pointer to beginning of memory block that is
+ * 8 byte aligned. The content of allocated block is not initialized.
+ * On failure: calls abort() if called with kThrow_AllocFailType,
+ * otherwise returns NULL pointer.
+ */
void* alloc(size_t bytes, AllocFailType);
+
+ /**
+ * Shortcut for calling alloc with kThrow_AllocFailType.
+ */
void* allocThrow(size_t bytes) {
return this->alloc(bytes, kThrow_AllocFailType);
}
« no previous file with comments | « gyp/common_conditions.gypi ('k') | src/core/SkChunkAlloc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698