次の方法で共有


NdisInitializeNPagedLookasideList (Windows Embedded CE 6.0)

1/6/2010

NdisInitializeNPagedLookasideList initializes a lookaside list. After a successful initialization, nonpaged fixed-size blocks can be allocated from and freed to the lookaside list.

Syntax

VOID  NdisInitializeNPagedLookasideList(  IN  PNPAGED_LOOKASIDE_LIST Lookaside,  IN  PALLOCATE_FUNCTION Allocate OPTIONAL,  IN  PFREE_FUNCTION Free OPTIONAL,  IN  ULONG Flags,  IN  ULONG Size,  IN  ULONG Tag,  IN  USHORT Depth);

Parameters

Lookaside

Pointer to the caller-supplied lookaside list head to be initialized. The driver must provide a list head that is resident — that is, in nonpaged system space.

Allocate

Either is NULL or specifies the entry point of a caller-supplied function that will allocate an entry of the specified Size whenever it is called. If allocate is NULL, NdisAllocateFromNPagedLookasideList subsequently allocates entries on behalf of the caller. If the caller provides an Allocate function, it also must provide a free function.

Free

Either is NULL or specifies the entry point of a caller-supplied function that will free an entry of the specified Size whenever it is called. If free is NULL, NdisFreeToNPagedLookasideList subsequently frees entries on behalf of the caller.

Flags

Must be zero. This parameter is reserved for system use.

Size

Specifies the size in bytes of each entry to be subsequently allocated from the lookaside list.

Tag

Specifies a caller-supplied pool tag for lookaside list entries. The Tag is a string of four characters delimited by single quote marks (for example, 'derF'). The characters are usually specified in reverse order so they are easier to read when dumping pool or tracking pool usage in the debugger.

Depth

Must be zero. This parameter is also reserved for system use.

Property Value/Return Value

None.

Remarks

If the lookaside list has not reached the system-determined maximum number of entries, entry is inserted at the front of the lookaside list. If the list has reached its maximum size, Entry is released to nonpaged pool. That is, NdisFreeToNPagedLookasideList either calls the driver's free function if the driver provided one to NdisInitializeNPagedLookasideListt, or it frees the given entry itself.

Requirements

Header ndis.h
Library ndis.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

NDIS Library Functions
NdisAllocateFromNPagedLookasideList
NdisInitializeNPagedLookasideList
NdisDeleteNPagedLookasideList