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

Side by Side Diff: Source/wtf/FastMalloc.h

Issue 23604048: Get rid of fastMallocGoodSize() and replace it with something generic. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix compile error. Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/wtf/FastMalloc.cpp » ('j') | Source/wtf/Vector.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 14 matching lines...) Expand all
25 #include <cstddef> 25 #include <cstddef>
26 26
27 namespace WTF { 27 namespace WTF {
28 28
29 // These functions crash safely if an allocation fails. 29 // These functions crash safely if an allocation fails.
30 WTF_EXPORT void* fastMalloc(size_t); 30 WTF_EXPORT void* fastMalloc(size_t);
31 WTF_EXPORT void* fastZeroedMalloc(size_t); 31 WTF_EXPORT void* fastZeroedMalloc(size_t);
32 WTF_EXPORT void* fastCalloc(size_t numElements, size_t elementSize); 32 WTF_EXPORT void* fastCalloc(size_t numElements, size_t elementSize);
33 WTF_EXPORT void* fastRealloc(void*, size_t); 33 WTF_EXPORT void* fastRealloc(void*, size_t);
34 WTF_EXPORT char* fastStrDup(const char*); 34 WTF_EXPORT char* fastStrDup(const char*);
35 WTF_EXPORT size_t fastMallocGoodSize(size_t);
36 35
37 WTF_EXPORT void fastFree(void*); 36 WTF_EXPORT void fastFree(void*);
38 37
39 #ifndef NDEBUG 38 #ifndef NDEBUG
40 WTF_EXPORT void fastMallocForbid(); 39 WTF_EXPORT void fastMallocForbid();
41 WTF_EXPORT void fastMallocAllow(); 40 WTF_EXPORT void fastMallocAllow();
42 #endif 41 #endif
43 42
44 WTF_EXPORT void releaseFastMallocFreeMemory(); 43 WTF_EXPORT void releaseFastMallocFreeMemory();
45 44
46 struct FastMallocStatistics { 45 struct FastMallocStatistics {
47 size_t reservedVMBytes; 46 size_t reservedVMBytes;
48 size_t committedVMBytes; 47 size_t committedVMBytes;
49 size_t freeListBytes; 48 size_t freeListBytes;
50 }; 49 };
51 WTF_EXPORT FastMallocStatistics fastMallocStatistics(); 50 WTF_EXPORT FastMallocStatistics fastMallocStatistics();
52 51
53 // This defines a type which holds an unsigned integer and is the same 52 // This defines a type which holds an unsigned integer and is the same
54 // size as the minimally aligned memory allocation. 53 // size as the minimally aligned memory allocation.
55 typedef unsigned long long AllocAlignmentInteger; 54 typedef unsigned long long AllocAlignmentInteger;
56 55
57 } // namespace WTF 56 } // namespace WTF
58 57
59 using WTF::fastCalloc; 58 using WTF::fastCalloc;
60 using WTF::fastFree; 59 using WTF::fastFree;
61 using WTF::fastMalloc; 60 using WTF::fastMalloc;
62 using WTF::fastMallocGoodSize;
63 using WTF::fastRealloc; 61 using WTF::fastRealloc;
64 using WTF::fastStrDup; 62 using WTF::fastStrDup;
65 using WTF::fastZeroedMalloc; 63 using WTF::fastZeroedMalloc;
66 64
67 #ifndef NDEBUG 65 #ifndef NDEBUG
68 using WTF::fastMallocForbid; 66 using WTF::fastMallocForbid;
69 using WTF::fastMallocAllow; 67 using WTF::fastMallocAllow;
70 #endif 68 #endif
71 69
72 #endif /* WTF_FastMalloc_h */ 70 #endif /* WTF_FastMalloc_h */
OLDNEW
« no previous file with comments | « no previous file | Source/wtf/FastMalloc.cpp » ('j') | Source/wtf/Vector.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698