PSDHLP_VMALLOC
PSDHLP_VMALLOC keywords
Description
Allocate
memory.
This function is used to allocate virtual memory, or map virtual memory
to physical memory, depending on the value of the flags. All virtual addresses
are allocated from the system arena (i.e. global address space).
Mode
Callable in
Init and Kernel mode.
Parameters
Pointer
to a VMALLOC structure.
Exit
Structures
typedef struct vmalloc_s
{
ulong_t addr; (Input/Output)
ulong_t cbsize; (Input)
ulong_t flags; (Input)
} VMALLOC;
addr
is filled with the linear address of the allocated
or mapped memory on return from the help.
If VMALLOC_LOCSPECIFIC is specified, this field must contain the virtual
address to map before calling the help.
If VMALLOC_PHYS is specified, this field must contain the physical address
to map before calling the help.
cbsize
is
the size of the allocation, or mapping in bytes.
flags
indicate which type of operation is to be performed.
VMALLOC_FIXED
indicates that the allocated memory
is to be fixed in memory (not-swappable or movable). If this flag is omitted,
the allocated memory will be swappable by default.
VMALLOC_CONTIG
indicates that the allocation must use contigous
physical memory. If this flag is specified VMALLOC_FIXED must also be used.
VMALLOC_LOCSPECIFIC
VMALLOC_PHYS
indicates a request for a virtual mapping of physical
memory. If this flag is specified, the addr field must contain the physical
address to map.
Note: This flag can be used with the VMALLOC_LOCSPECIFIC flag to
allocate memory where linear = physical.
VMALLOC_1M
indicates a request for a memory allocation below
the 1MB boundary.
Notes
[Back: PSD Helps]
[Next: PSDHLP_VMFREE]