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

Function _span_class_from_page_count

vm/ByteCodeTranslator/src/rpmalloc.c:427–431  ·  view source on GitHub ↗

Get the span size class from page count

Source from the content-addressed store, hash-verified

425
426//! Get the span size class from page count
427static size_t
428_span_class_from_page_count(size_t page_count) {
429 assert((page_count > 0) && (page_count <= 16));
430 return ((page_count + SPAN_CLASS_GRANULARITY - 1) / SPAN_CLASS_GRANULARITY) - 1;
431}
432
433//! Increase an allocation counter
434static void

Calls 1

assertFunction · 0.85

Tested by

no test coverage detected