1 /*
2  * COPYRIGHT:       See COPYING in the top level directory
3  * PROJECT:         ReactOS Kernel Streaming
4  * FILE:            drivers/wdm/audio/backpln/portcls/pool.cpp
5  * PURPOSE:         Memory functions
6  * PROGRAMMER:      Johannes Anderwald
7  */
8 
9 #include "private.hpp"
10 
11 #ifndef YDEBUG
12 #define NDEBUG
13 #endif
14 
15 #include <debug.h>
16 
17 PVOID
18 AllocateItem(
19     IN POOL_TYPE PoolType,
20     IN SIZE_T NumberOfBytes,
21     IN ULONG Tag)
22 {
23     PVOID Item = ExAllocatePoolWithTag(PoolType, NumberOfBytes, Tag);
24     if (!Item)
25         return Item;
26 
27     RtlZeroMemory(Item, NumberOfBytes);
28     return Item;
29 }
30 
31 VOID
32 FreeItem(
33     IN PVOID Item,
34     IN ULONG Tag)
35 {
36 
37     ExFreePoolWithTag(Item, Tag);
38 }
39