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

Function list_alloc

src/engine/lists.cpp:26–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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