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

Function _memory_heap_lookup

vm/ByteCodeTranslator/src/rpmalloc.c:417–424  ·  view source on GitHub ↗

Lookup a memory heap from heap ID

Source from the content-addressed store, hash-verified

415
416//! Lookup a memory heap from heap ID
417static heap_t*
418_memory_heap_lookup(int32_t id) {
419 uint32_t list_idx = id % HEAP_ARRAY_SIZE;
420 heap_t* heap = atomic_load_ptr(&_memory_heaps[list_idx]);
421 while (heap && (heap->id != id))
422 heap = heap->next_heap;
423 return heap;
424}
425
426//! Get the span size class from page count
427static size_t

Callers 2

_memory_allocate_heapFunction · 0.85
_memory_deallocate_deferFunction · 0.85

Calls 1

atomic_load_ptrFunction · 0.85

Tested by

no test coverage detected