2009-04-03 17:06:16 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS Kernel Streaming
|
2009-09-11 06:33:55 +00:00
|
|
|
* FILE: drivers/wdm/audio/backpln/portcls/pool.cpp
|
2009-04-03 17:06:16 +00:00
|
|
|
* PURPOSE: Memory functions
|
|
|
|
* PROGRAMMER: Johannes Anderwald
|
|
|
|
*/
|
2009-01-17 11:19:27 +00:00
|
|
|
|
2009-09-11 06:53:50 +00:00
|
|
|
#include "private.hpp"
|
2009-01-17 11:19:27 +00:00
|
|
|
|
2014-01-03 17:10:56 +00:00
|
|
|
#ifndef YDEBUG
|
|
|
|
#define NDEBUG
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <debug.h>
|
|
|
|
|
2009-01-17 11:19:27 +00:00
|
|
|
PVOID
|
|
|
|
AllocateItem(
|
|
|
|
IN POOL_TYPE PoolType,
|
|
|
|
IN SIZE_T NumberOfBytes,
|
|
|
|
IN ULONG Tag)
|
|
|
|
{
|
|
|
|
PVOID Item = ExAllocatePoolWithTag(PoolType, NumberOfBytes, Tag);
|
|
|
|
if (!Item)
|
|
|
|
return Item;
|
|
|
|
|
|
|
|
RtlZeroMemory(Item, NumberOfBytes);
|
|
|
|
return Item;
|
|
|
|
}
|
|
|
|
|
|
|
|
VOID
|
|
|
|
FreeItem(
|
|
|
|
IN PVOID Item,
|
|
|
|
IN ULONG Tag)
|
|
|
|
{
|
|
|
|
|
2009-02-15 13:29:01 +00:00
|
|
|
ExFreePoolWithTag(Item, Tag);
|
2009-01-17 11:19:27 +00:00
|
|
|
}
|