mirror of
https://github.com/reactos/reactos.git
synced 2025-03-10 18:24:02 +00:00
- Allocate send and receive buffers from paged pool (saves 32KB of non-paged pool per socket)
svn path=/branches/aicom-network-branch/; revision=44369
This commit is contained in:
parent
2cb569197b
commit
cf3234d59c
2 changed files with 4 additions and 4 deletions
|
@ -37,12 +37,12 @@ NTSTATUS MakeSocketIntoConnection( PAFD_FCB FCB ) {
|
|||
|
||||
/* Allocate the receive area and start receiving */
|
||||
FCB->Recv.Window =
|
||||
ExAllocatePool( NonPagedPool, FCB->Recv.Size );
|
||||
ExAllocatePool( PagedPool, FCB->Recv.Size );
|
||||
|
||||
if( !FCB->Recv.Window ) return STATUS_NO_MEMORY;
|
||||
|
||||
FCB->Send.Window =
|
||||
ExAllocatePool( NonPagedPool, FCB->Send.Size );
|
||||
ExAllocatePool( PagedPool, FCB->Send.Size );
|
||||
|
||||
if( !FCB->Send.Window ) {
|
||||
ExFreePool( FCB->Recv.Window );
|
||||
|
|
|
@ -144,11 +144,11 @@ AfdCreateSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
|||
if( FCB->Flags & SGID_CONNECTIONLESS ) {
|
||||
AFD_DbgPrint(MID_TRACE,("Packet oriented socket\n"));
|
||||
/* Allocate our backup buffer */
|
||||
FCB->Recv.Window = ExAllocatePool( NonPagedPool, FCB->Recv.Size );
|
||||
FCB->Recv.Window = ExAllocatePool( PagedPool, FCB->Recv.Size );
|
||||
if( !FCB->Recv.Window ) Status = STATUS_NO_MEMORY;
|
||||
if( NT_SUCCESS(Status) )
|
||||
{
|
||||
FCB->Send.Window = ExAllocatePool( NonPagedPool, FCB->Send.Size );
|
||||
FCB->Send.Window = ExAllocatePool( PagedPool, FCB->Send.Size );
|
||||
if( !FCB->Send.Window ) {
|
||||
if( FCB->Recv.Window ) ExFreePool( FCB->Recv.Window );
|
||||
Status = STATUS_NO_MEMORY;
|
||||
|
|
Loading…
Reference in a new issue