equal
deleted
inserted
replaced
292 { |
292 { |
293 return Tpool->CleaningPool(); |
293 return Tpool->CleaningPool(); |
294 } |
294 } |
295 |
295 |
296 public: |
296 public: |
297 /** |
297 static bool CanAllocateItem(); |
298 * Check whether we can allocate an item in this pool. This to prevent the |
|
299 * need to actually construct the object and then destructing it again, |
|
300 * which could be *very* costly. |
|
301 * @return true if and only if at least ONE item can be allocated. |
|
302 */ |
|
303 static inline bool CanAllocateItem() |
|
304 { |
|
305 return AllocateRaw() != NULL; |
|
306 } |
|
307 }; |
298 }; |
308 |
299 |
309 |
300 |
310 #define OLD_POOL_ENUM(name, type, block_size_bits, max_blocks) \ |
301 #define OLD_POOL_ENUM(name, type, block_size_bits, max_blocks) \ |
311 enum { \ |
302 enum { \ |