Index: tools/build/v2/engine/lists.c =================================================================== --- tools/build/v2/engine/lists.c (revision 83162) +++ tools/build/v2/engine/lists.c (working copy) @@ -13,11 +13,8 @@ #include +static LIST * freelist[ 32 ]; /* junkpile for list_dealloc() */ -struct freelist_node { struct freelist_node * next; }; - -static struct freelist_node * freelist[ 32 ]; /* junkpile for list_dealloc() */ - static unsigned get_bucket( unsigned size ) { unsigned bucket = 0; @@ -30,9 +27,9 @@ unsigned const bucket = get_bucket( size ); if ( freelist[ bucket ] ) { - struct freelist_node * result = freelist[ bucket ]; - freelist[ bucket ] = result->next; - return (LIST *)result; + LIST * result = freelist[ bucket ]; + freelist[ bucket ] = result->impl.next; + return result; } return (LIST *)BJAM_MALLOC( sizeof( LIST ) + ( 1u << bucket ) * sizeof( OBJECT * ) ); @@ -42,7 +39,7 @@ { unsigned size = list_length( l ); unsigned bucket; - struct freelist_node * node = (struct freelist_node *)l; + LIST * node = l; if ( size == 0 ) return; @@ -51,7 +48,7 @@ #ifdef BJAM_NO_MEM_CACHE BJAM_FREE( node ); #else - node->next = freelist[ bucket ]; + node->impl.next = freelist[ bucket ]; freelist[ bucket ] = node; #endif } @@ -372,11 +369,11 @@ int i; for ( i = 0; i < sizeof( freelist ) / sizeof( freelist[ 0 ] ); ++i ) { - struct freelist_node * l = freelist[ i ]; + LIST * l = freelist[ i ]; while ( l ) { - struct freelist_node * const tmp = l; - l = l->next; + LIST * const tmp = l; + l = l->impl.next; BJAM_FREE( tmp ); } } Index: tools/build/v2/engine/lists.h =================================================================== --- tools/build/v2/engine/lists.h (revision 83162) +++ tools/build/v2/engine/lists.h (working copy) @@ -54,6 +54,7 @@ typedef struct _list { union { int size; + struct _list * next; OBJECT * align; } impl; } LIST;