ReactOS  0.4.13-dev-651-g5dbc677
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 {
22  PVOID Buffer;
23 
24  /* FIXME: Get buffer from a free buffer pool with enough room */
25 
26  Buffer = malloc(Size);
27 
28  TI_DbgPrint(DEBUG_MEMORY, ("Allocated (%i) bytes at (0x%X).\n", Size, Buffer));
29 
30  return Buffer;
31 }
#define TI_DbgPrint(_t_, _x_)
Definition: debug.h:45
#define DEBUG_MEMORY
Definition: debug.h:18
Definition: bufpool.h:45
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
#define malloc
Definition: debug_ros.c:4
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34

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 TI_DbgPrint(_t_, _x_)
Definition: debug.h:45
#define free
Definition: debug_ros.c:5
#define DEBUG_MEMORY
Definition: debug.h:18
Definition: bufpool.h:45

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
LIST_ENTRY List
Definition: psmgr.c:57

◆ 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