Constants

VMEM_VM_BESTFIT

VMEM_VM_INSTANTFIT

VMEM_VM_SLEEP

VMEM_VM_NOSLEEP

VMEM_VM_BOOTSTRAP

VMEM_VM_POPULATING

VMEM_VM_FIT_MASK

VMEM_STATIC_SEG_COUNT

VMEM_MIN_RESERVE

VMEM_FREELISTS_N

VMEM_HASHTABLE_N

VMEM_SEGMENT_ALLOCATED

VMEM_SEGMENT_FREE

VMEM_SEGMENT_SPAN

VMEM_SEGMENT_STATIC_SPAN

VMEM_ALLOC

VMEM_FREE

VMEM_MIN_ADDR

VMEM_MAX_ADDR

Macros

VMEM_GET_LIST_FROM_SIZE

Structs

VmemSegment

Vmem

Functions

_murmur32

_murmur32

In

EAXAddress

Out

EAXHash

_hash_table_addr

__hash_table_addr

In

EAXVmem
EDXADDR

_vmem_segfree

_vmem_segfree

In

EAXSegment address

_vmem_segalloc

_vmem_segalloc

Out

EAXPointer to VmemSegment object on success, 0 on error

_vmem_refill

_vmem_refill

_vmem_segfit

_vmem_segfit

Check if a VmemSegment meet restrictions.

In

EAXseg
EDXsize
ECXalign
ESP[4]phase
ESP[8]nocross
ESP[12]minaddr
ESP[16]macaddr
ESP[20]addrp

_vmem_add

_vmem_add

In

EAXPointer to Vmem object.
EDXAddress.
ECXSize in bytes.
ESP[4]Flags.  (VMEM_VM_SLEEP or VMEM_VM_NOSLEEP)
ESP[8]Span type (VMEM_SEGMENT_SPAN or VMEM_SEGMENT_STATIC_SPAN)

Out

EAX0 on success.

_vmem_import

_vmem_import

Public functions

Summary
Functions
vmem_createCreates a new Vmem arena whose initial span is [Base, Base + Size).
vmem_destroyDestroys an arena
vmem_allocAllocates n-bytes from arena.
vmem_freeFree n-bytes at address to arena
vmem_xalloc
vmem_xfreeFrees n-bytes at address.
vmem_addAdds a span [Address, Address + Size) to an arena.
vmem_sizeReturn information about arenas size
vmem_dump
vmem_bootstrapInitialize static segments

Functions

vmem_create

vmem_create

Creates a new Vmem arena whose initial span is [Base, Base + Size).

In

EAXPointer to a Vmem object.
EDXString.
ECXBase.
ESP[4]Size in bytes.
ESP[8]Quantum.
ESP[12]Alloc function.
ESP[16]Free function.
ESP[20]Source.
ESP[24]Flags.  (VMEM_VM_SLEEP or VMEM_VM_NOSLEEP)

vmem_destroy

vmem_destroy

Destroys an arena

In

EAXPointer to a Vmem object.

vmem_alloc

vmem_alloc

Allocates n-bytes from arena.

In

EAXPointer to a Vmem object.
EDXSize in bytes.
ECXFlags

Out

EAXAllocated address on succes, 0 on failure.

vmem_free

vmem_free

Free n-bytes at address to arena

In

EAXPointer to a Vmem object.
EDXAddress.
ECXSize in bytes.

vmem_xalloc

vmem_xalloc

In

EAXPointer to a Vmem object.
EDXSize in bytes.
ECXAlignment boundary.
ESP[4]Phase.
ESP[8]Nocross.
ESP[12]Min address.
ESP[16]Max address.
ESP[20]Flags.  (VMEM_VM_BESTFIT, VMEM_VM_INSTANTFIT, VMEM_VM_SLEEP, VMEM_VM_NOSLEEP)

Out

EAXAllocated address on succes, 0 on failure.

vmem_xfree

vmem_xfree

Frees n-bytes at address.

In

EAXPointer to Vmem object.
EDXAddress.
ECXSize in bytes.

vmem_add

vmem_add

Adds a span [Address, Address + Size) to an arena.

In

EAXPointer to Vmem object.
EDXAddress.
ECXSize in bytes.
ESP[4]Flags.  (VMEM_VM_SLEEP or VMEM_VM_NOSLEEP)

Out

EAXReturn Address on success, 0 on failure.

vmem_size

vmem_size

Return information about arenas size

In

EAXPointer to Vmem object.
EDXType mask.

Out

EAXFree/allocated size in arena.

vmem_dump

vmem_dump

vmem_bootstrap

vmem_bootstrap

Initialize static segments

aVmemStaticSegs

aVmemStaticSegs db VMEM_STATIC_SEG_COUNT*sizeof.VmemSegment dup()

pVmemFreeSegHead

pVmemFreeSegHead dd 0

iVmemFreeSegCount

iVmemFreeSegCount dd 0

Debug

_murmur32
__hash_table_addr
_vmem_segfree
_vmem_segalloc
_vmem_refill
_vmem_segfit
Check if a VmemSegment meet restrictions.
_vmem_add
_vmem_import
vmem_create
Creates a new Vmem arena whose initial span is [Base, Base + Size).
vmem_destroy
Destroys an arena
vmem_alloc
Allocates n-bytes from arena.
vmem_free
Free n-bytes at address to arena
vmem_xalloc
vmem_xfree
Frees n-bytes at address.
vmem_add
Adds a span [Address, Address + Size) to an arena.
vmem_size
Return information about arenas size
vmem_dump
vmem_bootstrap
Initialize static segments
aVmemStaticSegs db VMEM_STATIC_SEG_COUNT*sizeof.VmemSegment dup()
pVmemFreeSegHead dd 0
iVmemFreeSegCount dd 0
Close