Changeset 2267 in webkit for trunk/JavaScriptCore/kjs/collector.cpp
- Timestamp:
- Oct 7, 2002, 2:06:29 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.