MCPcopy Create free account
hub / github.com/boostorg/build / list_alloc

Function list_alloc

v2/engine/lists.c:25–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25static LIST * list_alloc( unsigned const size )
26{
27 unsigned const bucket = get_bucket( size );
28 if ( freelist[ bucket ] )
29 {
30 LIST * result = freelist[ bucket ];
31 freelist[ bucket ] = result->impl.next;
32 return result;
33 }
34 return (LIST *)BJAM_MALLOC( sizeof( LIST ) + ( 1u << bucket ) *
35 sizeof( OBJECT * ) );
36}
37
38static void list_dealloc( LIST * l )
39{

Callers 7

list_appendFunction · 0.85
list_newFunction · 0.85
list_push_backFunction · 0.85
list_copyFunction · 0.85
list_copy_rangeFunction · 0.85
list_pop_frontFunction · 0.85
list_reverseFunction · 0.85

Calls 1

get_bucketFunction · 0.85

Tested by

no test coverage detected