Overhaul to console structure, a bit
This commit is contained in:
+19
-19
@@ -265,21 +265,21 @@ void Z_Print (memzone_t *zone)
|
||||
{
|
||||
memblock_t *block;
|
||||
|
||||
Con_Printf ("zone size: %i location: %p\n",mainzone->size,mainzone);
|
||||
console::info ("zone size: %i location: %p\n",mainzone->size,mainzone);
|
||||
|
||||
for (block = zone->blocklist.next ; ; block = block->next)
|
||||
{
|
||||
Con_Printf ("block:%p size:%7i tag:%3i\n",
|
||||
console::info ("block:%p size:%7i tag:%3i\n",
|
||||
block, block->size, block->tag);
|
||||
|
||||
if (block->next == &zone->blocklist)
|
||||
break; // all blocks have been hit
|
||||
if ( (byte *)block + block->size != (byte *)block->next)
|
||||
Con_Printf ("ERROR: block size does not touch the next block\n");
|
||||
console::info ("ERROR: block size does not touch the next block\n");
|
||||
if ( block->next->prev != block)
|
||||
Con_Printf ("ERROR: next block doesn't have proper back link\n");
|
||||
console::info ("ERROR: next block doesn't have proper back link\n");
|
||||
if (!block->tag && !block->next->tag)
|
||||
Con_Printf ("ERROR: two consecutive free blocks\n");
|
||||
console::info ("ERROR: two consecutive free blocks\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -350,8 +350,8 @@ void Hunk_Print (bool all)
|
||||
starthigh = (hunk_t *)(hunk_base + hunk_size - hunk_high_used);
|
||||
endhigh = (hunk_t *)(hunk_base + hunk_size);
|
||||
|
||||
Con_Printf (" :%8i total hunk size\n", hunk_size);
|
||||
Con_Printf ("-------------------------\n");
|
||||
console::info (" :%8i total hunk size\n", hunk_size);
|
||||
console::info ("-------------------------\n");
|
||||
|
||||
while (1)
|
||||
{
|
||||
@@ -360,9 +360,9 @@ void Hunk_Print (bool all)
|
||||
//
|
||||
if ( h == endlow )
|
||||
{
|
||||
Con_Printf ("-------------------------\n");
|
||||
Con_Printf (" :%8i REMAINING\n", hunk_size - hunk_low_used - hunk_high_used);
|
||||
Con_Printf ("-------------------------\n");
|
||||
console::info ("-------------------------\n");
|
||||
console::info (" :%8i REMAINING\n", hunk_size - hunk_low_used - hunk_high_used);
|
||||
console::info ("-------------------------\n");
|
||||
h = starthigh;
|
||||
}
|
||||
|
||||
@@ -390,7 +390,7 @@ void Hunk_Print (bool all)
|
||||
//
|
||||
memcpy (name, h->name, HUNKNAME_LEN);
|
||||
if (all)
|
||||
Con_Printf ("%8p :%8i %8s\n",h, h->size, name);
|
||||
console::info ("%8p :%8i %8s\n",h, h->size, name);
|
||||
|
||||
//
|
||||
// print the total
|
||||
@@ -399,7 +399,7 @@ void Hunk_Print (bool all)
|
||||
strncmp (h->name, next->name, HUNKNAME_LEN - 1))
|
||||
{
|
||||
if (!all)
|
||||
Con_Printf (" :%8i %8s (TOTAL)\n",sum, name);
|
||||
console::info (" :%8i %8s (TOTAL)\n",sum, name);
|
||||
count = 0;
|
||||
sum = 0;
|
||||
}
|
||||
@@ -407,8 +407,8 @@ void Hunk_Print (bool all)
|
||||
h = next;
|
||||
}
|
||||
|
||||
Con_Printf ("-------------------------\n");
|
||||
Con_Printf ("%8i total blocks\n", totalblocks);
|
||||
console::info ("-------------------------\n");
|
||||
console::info ("%8i total blocks\n", totalblocks);
|
||||
|
||||
}
|
||||
|
||||
@@ -531,7 +531,7 @@ void *Hunk_HighAllocName (int size, const char *name)
|
||||
|
||||
if (hunk_size - hunk_low_used - hunk_high_used < size)
|
||||
{
|
||||
Con_Printf ("Hunk_HighAlloc: failed on %i bytes\n",size);
|
||||
console::info ("Hunk_HighAlloc: failed on %i bytes\n",size);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -620,7 +620,7 @@ void Cache_Move ( cache_system_t *c)
|
||||
new_cs = Cache_TryAlloc (c->size, true);
|
||||
if (new_cs)
|
||||
{
|
||||
// Con_Printf ("cache_move ok\n");
|
||||
// console::info ("cache_move ok\n");
|
||||
|
||||
std::memcpy ( new_cs+1, c+1, c->size - sizeof(cache_system_t) );
|
||||
new_cs->user = c->user;
|
||||
@@ -630,7 +630,7 @@ void Cache_Move ( cache_system_t *c)
|
||||
}
|
||||
else
|
||||
{
|
||||
// Con_Printf ("cache_move failed\n");
|
||||
// console::info ("cache_move failed\n");
|
||||
|
||||
Cache_Free (c->user, true); // tough luck... //johnfitz -- added second argument
|
||||
}
|
||||
@@ -814,7 +814,7 @@ void Cache_Print (void)
|
||||
|
||||
for (cd = cache_head.next ; cd != &cache_head ; cd = cd->next)
|
||||
{
|
||||
Con_Printf ("%8i : %s\n", cd->size, cd->name);
|
||||
console::info ("%8i : %s\n", cd->size, cd->name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -826,7 +826,7 @@ Cache_Report
|
||||
*/
|
||||
void Cache_Report (void)
|
||||
{
|
||||
Con_DPrintf ("%4.1f megabyte data cache\n", (hunk_size - hunk_high_used - hunk_low_used) / (float)(1024*1024) );
|
||||
console::debug ("%4.1f megabyte data cache\n", (hunk_size - hunk_high_used - hunk_low_used) / (float)(1024*1024) );
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user