mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
Removed debug code
Compile correctly with pool validation enabled svn path=/trunk/; revision=1878
This commit is contained in:
parent
53de047b71
commit
278ce6bf50
2 changed files with 11 additions and 9 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: mminit.c,v 1.21 2001/05/01 23:08:20 chorns Exp $
|
/* $Id: mminit.c,v 1.22 2001/05/03 17:23:59 chorns Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top directory
|
* COPYRIGHT: See COPYING in the top directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -256,7 +256,7 @@ VOID MmInit1(ULONG FirstKrnlPhysAddr,
|
||||||
/* add 1MB for standard memory (not extended) */
|
/* add 1MB for standard memory (not extended) */
|
||||||
MmStats.NrTotalPages += 256;
|
MmStats.NrTotalPages += 256;
|
||||||
}
|
}
|
||||||
#if 1
|
#ifdef BIOS_MEM_FIX
|
||||||
MmStats.NrTotalPages += 16;
|
MmStats.NrTotalPages += 16;
|
||||||
#endif
|
#endif
|
||||||
DbgPrint("Used memory %dKb\n", (MmStats.NrTotalPages * PAGESIZE) / 1024);
|
DbgPrint("Used memory %dKb\n", (MmStats.NrTotalPages * PAGESIZE) / 1024);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: npool.c,v 1.44 2001/03/25 02:34:28 dwelch Exp $
|
/* $Id: npool.c,v 1.45 2001/05/03 17:24:00 chorns Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
#include <internal/debug.h>
|
#include <internal/debug.h>
|
||||||
|
|
||||||
/* Enable strict checking of the nonpaged pool on every allocation */
|
/* Enable strict checking of the nonpaged pool on every allocation */
|
||||||
/* #define ENABLE_VALIDATE_POOL */
|
//#define ENABLE_VALIDATE_POOL
|
||||||
|
|
||||||
/* Enable tracking of statistics about the tagged blocks in the pool */
|
/* Enable tracking of statistics about the tagged blocks in the pool */
|
||||||
#define TAG_STATISTICS_TRACKING
|
#define TAG_STATISTICS_TRACKING
|
||||||
|
@ -433,7 +433,7 @@ static void validate_used_list(void)
|
||||||
KeBugCheck(KBUG_POOL_FREE_LIST_CORRUPT);
|
KeBugCheck(KBUG_POOL_FREE_LIST_CORRUPT);
|
||||||
}
|
}
|
||||||
if (base_addr < (kernel_pool_base) ||
|
if (base_addr < (kernel_pool_base) ||
|
||||||
(base_addr+current->size) >
|
(base_addr+current->Size) >
|
||||||
(kernel_pool_base)+NONPAGED_POOL_SIZE)
|
(kernel_pool_base)+NONPAGED_POOL_SIZE)
|
||||||
{
|
{
|
||||||
DbgPrint("Block %x found outside pool area\n",current);
|
DbgPrint("Block %x found outside pool area\n",current);
|
||||||
|
@ -466,7 +466,7 @@ static void check_duplicates(BLOCK_HDR* blk)
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
unsigned int base = (int)blk;
|
unsigned int base = (int)blk;
|
||||||
unsigned int last = ((int)blk) + +sizeof(BLOCK_HDR) + blk->size;
|
unsigned int last = ((int)blk) + +sizeof(BLOCK_HDR) + blk->Size;
|
||||||
BLOCK_HDR* current;
|
BLOCK_HDR* current;
|
||||||
PLIST_ENTRY current_entry;
|
PLIST_ENTRY current_entry;
|
||||||
|
|
||||||
|
@ -488,7 +488,7 @@ static void check_duplicates(BLOCK_HDR* blk)
|
||||||
for(;;);
|
for(;;);
|
||||||
}
|
}
|
||||||
if ( (int)current < base &&
|
if ( (int)current < base &&
|
||||||
((int)current + current->size + sizeof(BLOCK_HDR))
|
((int)current + current->Size + sizeof(BLOCK_HDR))
|
||||||
> base )
|
> base )
|
||||||
{
|
{
|
||||||
DbgPrint("intersecting blocks on list\n");
|
DbgPrint("intersecting blocks on list\n");
|
||||||
|
@ -509,7 +509,7 @@ static void check_duplicates(BLOCK_HDR* blk)
|
||||||
for(;;);
|
for(;;);
|
||||||
}
|
}
|
||||||
if ( (int)current < base &&
|
if ( (int)current < base &&
|
||||||
((int)current + current->size + sizeof(BLOCK_HDR))
|
((int)current + current->Size + sizeof(BLOCK_HDR))
|
||||||
> base )
|
> base )
|
||||||
{
|
{
|
||||||
DbgPrint("intersecting blocks on list\n");
|
DbgPrint("intersecting blocks on list\n");
|
||||||
|
@ -823,6 +823,8 @@ VOID STDCALL ExFreePool (PVOID block)
|
||||||
BLOCK_HDR* blk=address_to_block(block);
|
BLOCK_HDR* blk=address_to_block(block);
|
||||||
KIRQL oldIrql;
|
KIRQL oldIrql;
|
||||||
|
|
||||||
|
assert(block);
|
||||||
|
|
||||||
OLD_DPRINT("(%s:%d) freeing block %x\n",__FILE__,__LINE__,blk);
|
OLD_DPRINT("(%s:%d) freeing block %x\n",__FILE__,__LINE__,blk);
|
||||||
|
|
||||||
POOL_TRACE("ExFreePool(block %x), size %d, caller %x\n",block,blk->size,
|
POOL_TRACE("ExFreePool(block %x), size %d, caller %x\n",block,blk->size,
|
||||||
|
|
Loading…
Reference in a new issue