ReactOS 0.4.16-dev-320-g3bd9ddc
mockpool.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS TCP/IP protocol driver
4 * FILE: tcpip/pool.c
5 * PURPOSE: Routines for controling pools
6 * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
7 * REVISIONS:
8 * CSH 01/08-2000 Created
9 */
10
11#include "precomp.h"
12
14 ULONG Size)
15/*
16 * FUNCTION: Returns a buffer from the free buffer pool
17 * RETURNS:
18 * Pointer to buffer, NULL if there was not enough
19 * free resources
20 */
21{
23
24 /* FIXME: Get buffer from a free buffer pool with enough room */
25
27
28 TI_DbgPrint(DEBUG_MEMORY, ("Allocated (%i) bytes at (0x%X).\n", Size, Buffer));
29
30 return Buffer;
31}
32
33
36/*
37 * FUNCTION: Returns a buffer to the free buffer pool
38 * ARGUMENTS:
39 * Buffer = Buffer to return to free buffer pool
40 */
41{
42 /* FIXME: Put buffer in free buffer pool */
43
44 TI_DbgPrint(DEBUG_MEMORY, ("Freeing buffer at (0x%X).\n", Buffer));
45
46 free(Buffer);
47}
48
50 return PoolAllocateBuffer( List->Size );
51}
52
54 PVOID Thing ) {
55 PoolFreeBuffer( Thing );
56}
57
58/* EOF */
Definition: bufpool.h:45
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define DEBUG_MEMORY
Definition: debug.h:18
#define TI_DbgPrint(_t_, _x_)
Definition: debug.h:45
VOID PoolFreeBuffer(PVOID Buffer)
Definition: mockpool.c:34
VOID TcpipFreeToNPagedLookasideList(PNPAGED_LOOKASIDE_LIST List, PVOID Thing)
Definition: mockpool.c:53
PVOID PoolAllocateBuffer(ULONG Size)
Definition: mockpool.c:13
PVOID TcpipAllocateFromNPagedLookasideList(PNPAGED_LOOKASIDE_LIST List)
Definition: mockpool.c:49
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550
struct LOOKASIDE_ALIGN _NPAGED_LOOKASIDE_LIST * PNPAGED_LOOKASIDE_LIST