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

Unified Diff: src/core/SkVarAlloc.cpp

Issue 1551673002: remove use of malloc.h (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkVarAlloc.cpp
diff --git a/src/core/SkVarAlloc.cpp b/src/core/SkVarAlloc.cpp
index 840cf28347283632ec4a8ad810afdb52e1ea8228..1fbd382c1948d5728462fc02af6b0350886d08de 100644
--- a/src/core/SkVarAlloc.cpp
+++ b/src/core/SkVarAlloc.cpp
@@ -7,13 +7,6 @@
#include "SkVarAlloc.h"
-// We use non-standard malloc diagnostic methods to make sure our allocations are sized well.
-#if defined(SK_BUILD_FOR_MAC)
- #include <malloc/malloc.h>
-#elif defined(SK_BUILD_FOR_UNIX) || defined(SK_BUILD_FOR_WIN32)
- #include <malloc.h>
-#endif
-
struct SkVarAlloc::Block {
Block* prev;
char* data() { return (char*)(this + 1); }
@@ -60,11 +53,4 @@ void SkVarAlloc::makeSpace(size_t bytes) {
fBlock = Block::Alloc(fBlock, alloc);
fByte = fBlock->data();
fRemaining = alloc - sizeof(Block);
-
-#if defined(SK_BUILD_FOR_MAC)
- SkASSERT(alloc == malloc_good_size(alloc));
-#elif defined(SK_BUILD_FOR_UNIX) && !defined(__UCLIBC__)
- // TODO(mtklein): tune so we can assert something like this
- //SkASSERT(alloc == malloc_usable_size(fBlock));
-#endif
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698