ReactOS 0.4.15-dev-7918-g2a2556c
mockpool.c File Reference
#include "precomp.h"
Include dependency graph for mockpool.c:

Go to the source code of this file.

Functions

PVOID PoolAllocateBuffer (ULONG Size)
 
VOID PoolFreeBuffer (PVOID Buffer)
 
PVOID TcpipAllocateFromNPagedLookasideList (PNPAGED_LOOKASIDE_LIST List)
 
VOID TcpipFreeToNPagedLookasideList (PNPAGED_LOOKASIDE_LIST List, PVOID Thing)
 

Function Documentation

◆ PoolAllocateBuffer()

PVOID PoolAllocateBuffer ( ULONG  Size)

Definition at line 13 of file mockpool.c.

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}
Definition: bufpool.h:45
#define malloc
Definition: debug_ros.c:4
#define DEBUG_MEMORY
Definition: debug.h:18
#define TI_DbgPrint(_t_, _x_)
Definition: debug.h:45
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533

Referenced by PrependPacket(), and TcpipAllocateFromNPagedLookasideList().

◆ PoolFreeBuffer()

VOID PoolFreeBuffer ( PVOID  Buffer)

Definition at line 34 of file mockpool.c.

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}
#define free
Definition: debug_ros.c:5

Referenced by TcpipFreeToNPagedLookasideList().

◆ TcpipAllocateFromNPagedLookasideList()

PVOID TcpipAllocateFromNPagedLookasideList ( PNPAGED_LOOKASIDE_LIST  List)

Definition at line 49 of file mockpool.c.

49 {
50 return PoolAllocateBuffer( List->Size );
51}
PVOID PoolAllocateBuffer(ULONG Size)
Definition: mockpool.c:13
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550

◆ TcpipFreeToNPagedLookasideList()

VOID TcpipFreeToNPagedLookasideList ( PNPAGED_LOOKASIDE_LIST  List,
PVOID  Thing 
)

Definition at line 53 of file mockpool.c.

54 {
55 PoolFreeBuffer( Thing );
56}
VOID PoolFreeBuffer(PVOID Buffer)
Definition: mockpool.c:34