•  Back 
  •  BIOS Function Reference 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-FileMalloc()
Mfree()
Getmpb()                                                               BIOS

Syntax

VOID Getmpb( mpb )

Function      Getmpb() returns information regarding GEMDOS free and
              allocated memory blocks.

Opcode        0 (0x00)

Availability  All TOS versions.

Parameters    mpb is a pointer to a MPB structure which is filled in by
              the function. The related structures are defined as
              follows:

              typedef struct md
              {
               struct md *m_link;  /* pointer to next block */
               VOIDP m_start;   /* pointer to start of block */
               LONG m_length;   /* length of block */
               BASEPAGE *m_own;  /* pointer to basepage of owner */
              } MD;

              typedef struct mpb
              {
               MD *mp_mfl;   /* free list */
               MD *mp_mal;   /* allocated list */
               MD *mp_rover;   /* roving pointer */
              } MPB;

Binding       pea      mpb
              clr.w    -(sp)
              trap     #13
              addq.l   #6,sp

Caveats       MultiTOS uses a very different method of memory management
              which makes this call useless.

Comments      An application should never attempt to modify any of the
              returned information nor make any assumptions about memory
              allocation because of this function.

See Also      Malloc(), Mfree()