aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2016-01-04 18:50:42 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-01-04 18:50:42 -0800
commit29dd813b13719b9d7082a017ce79590f1706dccd (patch)
tree70072e65828a0163fb15f72f7f3520e88b2a091f
parent12204d90337656542a42fa0fcccb7bec13af0cce (diff)
remove use of malloc.h
It's non-portable, commented out, and those asserts are not important. Let's just blow it away. BUG=skia:4736 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1551673002 Review URL: https://codereview.chromium.org/1551673002
-rw-r--r--src/core/SkVarAlloc.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/core/SkVarAlloc.cpp b/src/core/SkVarAlloc.cpp
index 840cf28347..1fbd382c19 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
}