OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 memset(result, 0, size); | 98 memset(result, 0, size); |
99 return reinterpret_cast<T*>(result); | 99 return reinterpret_cast<T*>(result); |
100 } | 100 } |
101 WTF_EXPORT static void freeHashTableBacking(void* address); | 101 WTF_EXPORT static void freeHashTableBacking(void* address); |
102 | 102 |
103 template <typename Return, typename Metadata> | 103 template <typename Return, typename Metadata> |
104 static Return malloc(size_t size) | 104 static Return malloc(size_t size) |
105 { | 105 { |
106 return reinterpret_cast<Return>(fastMalloc(size)); | 106 return reinterpret_cast<Return>(fastMalloc(size)); |
107 } | 107 } |
108 | |
109 WTF_EXPORT static inline bool expandHashTableBacking(void*, size_t) | |
110 { | |
111 return false; | |
112 } | |
113 static void free(void* address) | 108 static void free(void* address) |
114 { | 109 { |
115 fastFree(address); | 110 fastFree(address); |
116 } | 111 } |
117 template<typename T> | 112 template<typename T> |
118 static void* newArray(size_t bytes) | 113 static void* newArray(size_t bytes) |
119 { | 114 { |
120 return malloc<void*, void>(bytes); | 115 return malloc<void*, void>(bytes); |
121 } | 116 } |
122 static void | 117 static void |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 { \ | 200 { \ |
206 ASSERT(location); \ | 201 ASSERT(location); \ |
207 return location; \ | 202 return location; \ |
208 } \ | 203 } \ |
209 private: \ | 204 private: \ |
210 typedef int __thisIsHereToForceASemicolonAfterThisMacro | 205 typedef int __thisIsHereToForceASemicolonAfterThisMacro |
211 | 206 |
212 using WTF::DefaultAllocator; | 207 using WTF::DefaultAllocator; |
213 | 208 |
214 #endif // WTF_DefaultAllocator_h | 209 #endif // WTF_DefaultAllocator_h |
OLD | NEW |