MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / _memory_counter_increase

Function _memory_counter_increase

vm/ByteCodeTranslator/src/rpmalloc.c:434–444  ·  view source on GitHub ↗

Increase an allocation counter

Source from the content-addressed store, hash-verified

432
433//! Increase an allocation counter
434static 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
447static void

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected