OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1998-2000 Netscape Communications Corporation. | 2 * Copyright (C) 1998-2000 Netscape Communications Corporation. |
3 * Copyright (C) 2003-6 Apple Computer | 3 * Copyright (C) 2003-6 Apple Computer |
4 * | 4 * |
5 * Other contributors: | 5 * Other contributors: |
6 * Nick Blievers <nickb@adacel.com.au> | 6 * Nick Blievers <nickb@adacel.com.au> |
7 * Jeff Hostetler <jeff@nerdone.com> | 7 * Jeff Hostetler <jeff@nerdone.com> |
8 * Tom Rini <trini@kernel.crashing.org> | 8 * Tom Rini <trini@kernel.crashing.org> |
9 * Raffaele Sena <raff@netwinder.org> | 9 * Raffaele Sena <raff@netwinder.org> |
10 * | 10 * |
(...skipping 26 matching lines...) Expand all Loading... |
37 * version of this file under any of the LGPL, the MPL or the GPL. | 37 * version of this file under any of the LGPL, the MPL or the GPL. |
38 */ | 38 */ |
39 | 39 |
40 /* | 40 /* |
41 * Lifetime-based fast allocation, inspired by much prior art, including | 41 * Lifetime-based fast allocation, inspired by much prior art, including |
42 * "Fast Allocation and Deallocation of Memory Based on Object Lifetimes" | 42 * "Fast Allocation and Deallocation of Memory Based on Object Lifetimes" |
43 * David R. Hanson, Software -- Practice and Experience, Vol. 20(1). | 43 * David R. Hanson, Software -- Practice and Experience, Vol. 20(1). |
44 */ | 44 */ |
45 | 45 |
46 #include "config.h" | 46 #include "config.h" |
47 #include "Arena.h" | 47 #include "core/platform/Arena.h" |
48 | 48 |
49 #include <algorithm> | |
50 #include <stdlib.h> | 49 #include <stdlib.h> |
51 #include <string.h> | 50 #include <string.h> |
| 51 #include <algorithm> |
52 #include <wtf/Assertions.h> | 52 #include <wtf/Assertions.h> |
53 #include <wtf/FastMalloc.h> | 53 #include <wtf/FastMalloc.h> |
54 | 54 |
55 using namespace std; | 55 using namespace std; |
56 | 56 |
57 namespace WebCore { | 57 namespace WebCore { |
58 | 58 |
59 #ifdef DEBUG_ARENA_MALLOC | 59 #ifdef DEBUG_ARENA_MALLOC |
60 static int i = 0; | 60 static int i = 0; |
61 #endif | 61 #endif |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 } while ((arena = *arenaPointer) != 0); | 179 } while ((arena = *arenaPointer) != 0); |
180 pool->current = head; | 180 pool->current = head; |
181 } | 181 } |
182 | 182 |
183 void FinishArenaPool(ArenaPool* pool) | 183 void FinishArenaPool(ArenaPool* pool) |
184 { | 184 { |
185 FreeArenaList(pool, &pool->first); | 185 FreeArenaList(pool, &pool->first); |
186 } | 186 } |
187 | 187 |
188 } | 188 } |
OLD | NEW |