Increase an allocation counter
| 432 | |
| 433 | //! Increase an allocation counter |
| 434 | static void |
| 435 | _memory_counter_increase(span_counter_t* counter, uint32_t* global_counter) { |
| 436 | if (++counter->current_allocations > counter->max_allocations) { |
| 437 | counter->max_allocations = counter->current_allocations; |
| 438 | #if MAX_SPAN_CACHE_DIVISOR > 0 |
| 439 | counter->cache_limit = counter->max_allocations / MAX_SPAN_CACHE_DIVISOR; |
| 440 | #endif |
| 441 | if (counter->max_allocations > *global_counter) |
| 442 | *global_counter = counter->max_allocations; |
| 443 | } |
| 444 | } |
| 445 | |
| 446 | //! Insert the given list of memory page spans in the global cache for small/medium blocks |
| 447 | static void |
no outgoing calls
no test coverage detected