2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-14 07:11:32 +00:00

Tidied up debugging messages

This commit is contained in:
Michael Brown 2006-05-27 13:38:49 +00:00
parent aa2468babe
commit 1dbafa8950
2 changed files with 5 additions and 5 deletions

View File

@ -77,7 +77,7 @@ void * alloc_memblock ( size_t size, size_t align ) {
*/
size = ( size + MIN_MEMBLOCK_SIZE - 1 ) & ~( MIN_MEMBLOCK_SIZE - 1 );
align_mask = ( align - 1 ) | ( MIN_MEMBLOCK_SIZE - 1 );
DBG ( "Allocating %zx (aligned %zx)\n", size, align );
DBG ( "Allocating %#zx (aligned %#zx)\n", size, align );
/* Search through blocks for the first one with enough space */
list_for_each_entry ( block, &free_blocks, list ) {
@ -92,7 +92,7 @@ void * alloc_memblock ( size_t size, size_t align ) {
pre = block;
block = ( ( ( void * ) pre ) + pre_size );
post = ( ( ( void * ) block ) + size );
DBG ( "[%p,%p) -> [%p,%p) + [%p,%p)\n", pre,
DBG ( "[%p,%p) -> [%p,%p) + [%p,%p)\n", pre,
( ( ( void * ) pre ) + pre->size ), pre, block,
post, ( ( ( void * ) pre ) + pre->size ) );
/* If there is a "post" block, add it in to
@ -124,7 +124,7 @@ void * alloc_memblock ( size_t size, size_t align ) {
}
}
DBG ( "Failed to allocate %zx (aligned %zx)\n", size, align );
DBG ( "Failed to allocate %#zx (aligned %#zx)\n", size, align );
return NULL;
}
@ -261,7 +261,7 @@ void mdumpfree ( void ) {
printf ( "Free block list:\n" );
list_for_each_entry ( block, &free_blocks, list ) {
printf ( "[%p,%p] (size %zx)\n", block,
printf ( "[%p,%p] (size %#zx)\n", block,
( ( ( void * ) block ) + block->size ), block->size );
}
}

View File

@ -140,7 +140,7 @@ static const char * eth_ntoa ( const void *ll_addr ) {
static char buf[18]; /* "00:00:00:00:00:00" */
uint8_t *eth_addr = ll_addr;
sprintf ( buf, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx",
sprintf ( buf, "%02x:%02x:%02x:%02x:%02x:%02x",
eth_addr[0], eth_addr[1], eth_addr[2],
eth_addr[3], eth_addr[4], eth_addr[5] );
return buf;