Changeset 2267 in webkit for trunk/JavaScriptCore
- Timestamp:
- Oct 7, 2002, 2:06:29 PM (23 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r2262 r2267 1 2002-10-07 Darin Adler <[email protected]> 2 3 Fixed absurdly high memory usage when looking at pages that use a lot of JavaScript. 4 5 * kjs/collector.cpp: 6 (Collector::allocate): Implement a new policy of doing a garbage collect every 1000 7 allocations. The old policy was both complicated and misguided. 8 (Collector::collect): Zero out the "number of allocations since last collect". 9 1 10 2002-10-06 Darin Adler <[email protected]> 2 11 -
trunk/JavaScriptCore/ChangeLog-2002-12-03
r2262 r2267 1 2002-10-07 Darin Adler <[email protected]> 2 3 Fixed absurdly high memory usage when looking at pages that use a lot of JavaScript. 4 5 * kjs/collector.cpp: 6 (Collector::allocate): Implement a new policy of doing a garbage collect every 1000 7 allocations. The old policy was both complicated and misguided. 8 (Collector::collect): Zero out the "number of allocations since last collect". 9 1 10 2002-10-06 Darin Adler <[email protected]> 2 11 -
trunk/JavaScriptCore/ChangeLog-2003-10-25
r2262 r2267 1 2002-10-07 Darin Adler <[email protected]> 2 3 Fixed absurdly high memory usage when looking at pages that use a lot of JavaScript. 4 5 * kjs/collector.cpp: 6 (Collector::allocate): Implement a new policy of doing a garbage collect every 1000 7 allocations. The old policy was both complicated and misguided. 8 (Collector::collect): Zero out the "number of allocations since last collect". 9 1 10 2002-10-06 Darin Adler <[email protected]> 2 11 -
trunk/JavaScriptCore/kjs/collector.cpp
r1811 r2267 84 84 #endif 85 85 86 #if APPLE_CHANGES 87 static int numAllocationsSinceLastCollect = 0; 88 #endif 89 86 90 void* Collector::allocate(size_t s) 87 91 { … … 89 93 return 0L; 90 94 95 #if APPLE_CHANGES 96 if (++numAllocationsSinceLastCollect >= KJS_MEM_INCREMENT) 97 collect(); 98 #else 91 99 // Try and deal with memory requirements in a scalable way. Simple scripts 92 100 // should only require small amounts of memory, but for complex scripts we don't … … 109 117 } 110 118 } 119 #endif 111 120 112 121 void *m = malloc(s); … … 251 260 } 252 261 262 #if APPLE_CHANGES 263 numAllocationsSinceLastCollect = 0; 264 #endif 265 253 266 #if 0 254 267 // This is useful to track down memory leaks
Note:
See TracChangeset
for help on using the changeset viewer.