Function Memory.allocVec
allocVec -- Allocate vectored memory.
This function works identically to AllocMem(), but tracks the size of the allocation.
See the AllocMem() documentation for details.
Parameters
Name | Description |
---|---|
byteSize | the size of the desired block in bytes. (The operating system will automatically round this number to a multiple of the system memory chunk size (MEM_BLOCKSIZE) ) |
requirements | requirements If no flags are set (MEMF_ANY), the system will return the best available memory block. For expanded systems, the fast memory pool is searched first. |
MEMF PUBLIC
Memory that must not be mapped, swapped, or otherwise made non-addressable. ALL MEMORY THAT IS REFERENCED VIA INTERRUPTS AND/OR BY OTHER TASKS MUST BE EITHER PUBLIC OR LOCKED INTO MEMORY! This includes both code and data.
MEMF FAST
This is cpu-local memory. If no flag is set MEMF_FAST is taken as the default.
DO NOT SPECIFY MEMF_FAST unless you know exactly what you are doing! If MEMF_FAST is set, AllocMem() will fail on machines that only have chip memory! This flag may not be set when MEMF_CHIP is set.
MEMF VIDEO
This is video memory. Some graphics chips allow to use the graphics mem like usual memory. Useful for allocating BitMaps etc.
MEMF VIRTUAL
This is mapped memory. This flag requests memory, that can be swapped out to HD, if your system cpu that. MMU required. Other allocation will fail.
MEMF PERMANENT
This is memory that will not go away after the CPU RESET instruction. Normally, autoconfig memory boards become unavailable after RESET while motherboard memory may still be available. options
MEMF CLEAR
The memory will be initialized to all zeros.
MEMF REVERSE
This allocates memory from the top of the memory pool. It searches the pools in the same order, such that FAST memory will be found first. However, the memory will be allocated from the highest address available in the pool. MemFlags.No_Expunge This will prevent an expunge to happen on a failed memory allocation. If a memory allocation with this flag set fails, the allocator will not cause any expunge operations. (See AddMemHandler())
Returns
See the AllocMem() documentation for details.
Example
See the AllocMem() documentation for details.
Notes
See the AllocMem() documentation for details.
See
FreeVec(), AllocMem()