Functions | |
| void | dump_memory_map () |
This is a routine for debug only. It prints all the memory block headers.
| |
|
|
This is a routine for debug only. It prints all the memory block headers.
Definition at line 358 of file kmalloc.c.
00359 {
00360 mem_block_t *p = (mem_block_t *)K_HEAP_START;
00361
00362 for(;;)
00363 {
00364 kprintf(
00365 "\n\rp = %#010x"
00366 "\n\rp->magic = %s"
00367 "\n\rp->flags = %#010x"
00368 "\n\rp->size = %u"
00369 "\n\rp->owner = %i\n\r",
00370 (dword)p + sizeof(mem_block_t),
00371 (byte *)p->magic,
00372 p->flags,
00373 p->size,
00374 p->owner);
00375
00376 p = (void *)p + p->size + sizeof(mem_block_t);
00377
00378 if (p >= (mem_block_t *)K_HEAP_END) break;
00379
00380 // Wait for a key... //
00381 if (kgetchar() == CTRL_C) break;
00382 }
00383 }
|
1.2.18