- Convert portcls to a C++ driver
[reactos.git] / reactos / drivers / wdm / audio / backpln / portcls / pool.cpp
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.h"
10
11 PVOID
12 AllocateItem(
13 IN POOL_TYPE PoolType,
14 IN SIZE_T NumberOfBytes,
15 IN ULONG Tag)
16 {
17 PVOID Item = ExAllocatePoolWithTag(PoolType, NumberOfBytes, Tag);
18 if (!Item)
19 return Item;
20
21 RtlZeroMemory(Item, NumberOfBytes);
22 return Item;
23 }
24
25 VOID
26 FreeItem(
27 IN PVOID Item,
28 IN ULONG Tag)
29 {
30
31 ExFreePoolWithTag(Item, Tag);
32 }