List_Allocate

include vmm.inc

mov esi, List ; list handle

VMMcall List_Allocate

jc not_allocated ; carry flag set if error

mov [Node], eax ; address of new node


The List_Allocate service allocates a new node for the specified list. A virtual device can attach the new node to the list using the List_Attach or List_Insert service. The contents of the new node are undefined.

Parameters

List

Specifies the handle for the list.

Return Value

The EAX register contains the address of the new node if this service is successful. For lists created using the LF_Alloc_Error value, the carry flag is clear if the service is successful. For other lists, this service never returns if the new node cannot be allocated.

Comments

This service normally allocates nodes from a pool of free nodes. This prevents the overhead of calling the _HeapAlloc service for every node allocation. If the list is created using the LF_Use_Heap value, this service calls the _HeapAlloc service for each node.

Uses

EAX, Flags

See Also

List_Attach, List_Create, List_Deallocate, List_Insert