[comp.sys.mac.programmer] A062 trap name?

iron@imag.imag.fr (Francois Menneteau) (10/24/90)

I can't find it in IM.
-- 
Francois Menneteau ()   __|||||__   () "... I had their lives in my hands
================== ()    /O   O\    () their fate their fortune in my visions
iron@imag.fr       ()    - .|. -    () No one believed in my true prophecy
================== ()     \=^=/     () And now it's too late."  (Iron Maiden)

stevec@Apple.COM (Steve Christensen) (10/26/90)

In article <14539@imag.imag.fr> iron@imag.imag.fr (Francois Menneteau) writes:
>
>I can't find it in IM.

You must not be looking hard enough.  It's described in IM volume 4, page 78,
and the trap number/name is listed on page 306.  A062 is PurgeSpace:

  PROCEDURE PurgeSpace(VAR total,contig : LONGINT)

It returns the total amount of space and the maximum contiguous space in bytes
that could be obtained by doing a general heap purge.

steve

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 whoami?     Steve Christensen
 snail:      Apple Computer, 20525 Mariani Ave, MS-81CS, Cupertino, CA  95014
 Internet:   stevec@apple.com
 AppleLink:  stevec
 CompuServe: 76174,1712

russotto@eng.umd.edu (Matthew T. Russotto) (10/26/90)

In article <14539@imag.imag.fr> iron@imag.imag.fr (Francois Menneteau) writes:
>
>I can't find it in IM.

Trap $A062 is PurgeSpace.  I don't know what it does.


--
Matthew T. Russotto	russotto@eng.umd.edu	russotto@wam.umd.edu
Tax the rich, and feed the poor -- until there are, rich no more.

drc@iti.org (Dennis Cohen) (10/26/90)

russotto@eng.umd.edu (Matthew T. Russotto) writes:

>In article <14539@imag.imag.fr> iron@imag.imag.fr (Francois Menneteau) writes:
>>
>>I can't find it in IM.

>Trap $A062 is PurgeSpace.  I don't know what it does.

PurgeSpace returns (in total) the total amount of space in bytes that
could be obtained by a general purge without actually doing
the purge; this amount includes space that is already free.
The maximum contiguous space in bytes, including already free space,
that could be obtained by a purge is returned in contig.
In Pascal:
Procedure PurgeSpace (VAR total,contig: LONGINT);
In C:
void pascal PurgeSpace(long *total, long *contig);
In Asm:
    Trap macro  _PurgeSpace
                _PurgeSpace ,SYS    (applies to system heap)
    On exit     A0:  contig (long word)
                D0:  total (long word)

--
| Dennis Cohen     drc@claris.com   COHEN2   AFC DCohen    71076,1377
|                  Internet       AppleLink  AmerOnline    CompuServe
| Disclaimer:  Any unattributed opinions expressed above are _MINE_!