Unit 'Exec' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#aros]

AllocAbs

Allocate at a given location

Declaration

Source position: exec.pas line 1245

function AllocAbs(

  ByteSize: LongWord;

  Location: Pointer

):Pointer;

Arguments

ByteSize

  

The size of the desired block in bytes This number is rounded up to the next larger block size for the actual allocation.

Location

  

The address where the memory MUST be.

Function result

A pointer to the newly allocated memory block or nil

Description

This function attempts to allocate memory at a given absolute memory location. Often this is used by boot-surviving entities such as recoverable ram-disks. If the memory is already being used, or if there is not enough memory to satisfy the request, AllocAbs will return nil.

This block may not be exactly the same as the requested block because of rounding, but if the return value is non-zero, the block is guaranteed to contain the requested range.

Errors

Result is nil if failed. If the free list is corrupt, the system will panic with alert AN_MemCorrupt, $01000005.

See also

Exec.ExecAllocMem

  

Allocate memory given certain requirements

Exec.ExecFreeMem

  

Free a memory block with given size


Documentation generated on: 2021-07-30