Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenmockpool.c
Go to the documentation of this file.
00001 /* 00002 * COPYRIGHT: See COPYING in the top level directory 00003 * PROJECT: ReactOS TCP/IP protocol driver 00004 * FILE: tcpip/pool.c 00005 * PURPOSE: Routines for controling pools 00006 * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net) 00007 * REVISIONS: 00008 * CSH 01/08-2000 Created 00009 */ 00010 00011 #include "precomp.h" 00012 00013 PVOID PoolAllocateBuffer( 00014 ULONG Size) 00015 /* 00016 * FUNCTION: Returns a buffer from the free buffer pool 00017 * RETURNS: 00018 * Pointer to buffer, NULL if there was not enough 00019 * free resources 00020 */ 00021 { 00022 PVOID Buffer; 00023 00024 /* FIXME: Get buffer from a free buffer pool with enough room */ 00025 00026 Buffer = malloc(Size); 00027 00028 TI_DbgPrint(DEBUG_MEMORY, ("Allocated (%i) bytes at (0x%X).\n", Size, Buffer)); 00029 00030 return Buffer; 00031 } 00032 00033 00034 VOID PoolFreeBuffer( 00035 PVOID Buffer) 00036 /* 00037 * FUNCTION: Returns a buffer to the free buffer pool 00038 * ARGUMENTS: 00039 * Buffer = Buffer to return to free buffer pool 00040 */ 00041 { 00042 /* FIXME: Put buffer in free buffer pool */ 00043 00044 TI_DbgPrint(DEBUG_MEMORY, ("Freeing buffer at (0x%X).\n", Buffer)); 00045 00046 free(Buffer); 00047 } 00048 00049 PVOID TcpipAllocateFromNPagedLookasideList( PNPAGED_LOOKASIDE_LIST List ) { 00050 return PoolAllocateBuffer( List->Size ); 00051 } 00052 00053 VOID TcpipFreeToNPagedLookasideList( PNPAGED_LOOKASIDE_LIST List, 00054 PVOID Thing ) { 00055 PoolFreeBuffer( Thing ); 00056 } 00057 00058 /* EOF */ Generated on Sun May 27 2012 04:28:08 for ReactOS by
1.7.6.1
|