OSHeap_Resize Should Have R3 as Output.

Ralph Corderoy ralph at inputplus.demon.co.uk
Sat Nov 3 22:44:59 GMT 2001


Hi,

OSLib's entry doesn't match the PRM WRT R3.

    SWI OSHeap_Resize =
       (  NUMBER &1D,
          ENTRY
          (  R0 # 5 "Extends or shrinks a heap (PRM 1-375)",
             R1 = .Ref .Data: heap,
             R3 = .Int: size_increase
          )
       );

    OS_Heap 5 (SWI &1D)

    Extend or shrink heap

    On entry
        R0 = 5 (reason code)
        R1 = pointer to heap
        R3 = required size change in bytes (signed integer)

    On exit
        R0, R1 preserved
        R3 preserved, or amount of bytes heap shrunk by if requested
        shrink failed

    Use
        This updates the heap size information to take account of the
        new size. If the heap cannot shrink as far as requested -
        because of data that has already been allocated - it will
        shrink as far as possible, set R3 to the amount by which it
        shrank, and return an error.

Is this a bug or a sign of my unfamiliarity with OSLib's ways.

Cheers,


Ralph.




More information about the oslib-user mailing list