This trap allocates space from a user heap.

Call ParametersReturn Parameters
D1.LNumber of bytes required in user heap. D1.LNumber of bytes allocated.
D2.LUnused. D2.L Corrupted.
D3.LUnused. D3.L Corrupted.
A0.LPointer to pointer to free space (relative A6). A0.LAddress of area allocated.
A1.LUnused. A1.L Corrupted.
A2.LUnused. A2.L Corrupted.
A3.LUnused. A3.L Corrupted.
ERR_OMOut of memory (in user heap).

* All registers not shown above are not used on entry and are preserved on exit.

* A user heap is an area of memory, maybe in the common heap, set aside for use by a single job. The job can allocate areas of this user heap for its own needs, and deallocate them as required. This stops, or reduces fragmentation of the common heap which is used by every task in the system. See here for more information on heaps.

This example show the use of this, and other, heap manipulation traps.

  • qdosmsq/traps/trap_1/alhp.txt
  • Last modified: 2009/01/30 11:29
  • by norman