mirror of
https://github.com/reactos/reactos.git
synced 2025-04-18 19:47:14 +00:00
Print debug message if memory allocation fails
svn path=/trunk/; revision=7006
This commit is contained in:
parent
87219b9874
commit
d15b8ab119
2 changed files with 11 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: npool.c,v 1.77 2003/10/23 18:43:36 hbirr Exp $
|
/* $Id: npool.c,v 1.78 2003/12/13 21:11:53 gvg Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -1543,6 +1543,11 @@ ExAllocateNonPagedPoolWithTag(ULONG Type, ULONG Size, ULONG Tag, PVOID Caller)
|
||||||
|
|
||||||
block = ExAllocateWholePageBlock(Size);
|
block = ExAllocateWholePageBlock(Size);
|
||||||
KeReleaseSpinLock(&MmNpoolLock, oldIrql);
|
KeReleaseSpinLock(&MmNpoolLock, oldIrql);
|
||||||
|
if (NULL == block)
|
||||||
|
{
|
||||||
|
DPRINT1("Trying to allocate %lu bytes from nonpaged pool - nothing suitable found, returning NULL\n",
|
||||||
|
Size );
|
||||||
|
}
|
||||||
return(block);
|
return(block);
|
||||||
|
|
||||||
#else /* not WHOLE_PAGE_ALLOCATIONS */
|
#else /* not WHOLE_PAGE_ALLOCATIONS */
|
||||||
|
@ -1600,6 +1605,8 @@ ExAllocateNonPagedPoolWithTag(ULONG Type, ULONG Size, ULONG Tag, PVOID Caller)
|
||||||
if (best == NULL)
|
if (best == NULL)
|
||||||
{
|
{
|
||||||
KeReleaseSpinLock(&MmNpoolLock, oldIrql);
|
KeReleaseSpinLock(&MmNpoolLock, oldIrql);
|
||||||
|
DPRINT1("Trying to allocate %lu bytes from nonpaged pool - nothing suitable found, returning NULL\n",
|
||||||
|
Size );
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
best->Used.Tag = Tag;
|
best->Used.Tag = Tag;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: ppool.c,v 1.21 2003/10/20 18:43:11 ekohl Exp $
|
/* $Id: ppool.c,v 1.22 2003/12/13 21:11:53 gvg Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -308,7 +308,8 @@ ExAllocatePagedPoolWithTag (IN POOL_TYPE PoolType,
|
||||||
*/
|
*/
|
||||||
if (BestBlock == NULL)
|
if (BestBlock == NULL)
|
||||||
{
|
{
|
||||||
DPRINT("ExAllocatePagedPoolWithTag() - nothing suitable found, returning NULL\n" );
|
DPRINT1("Trying to allocate %lu bytes from paged pool - nothing suitable found, returning NULL\n",
|
||||||
|
NumberOfBytes );
|
||||||
ExReleaseFastMutex(&MmPagedPoolLock);
|
ExReleaseFastMutex(&MmPagedPoolLock);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue