MVG MEMORY UTILITY ROUTINES by Machiavelli Systems This document describes the mvg memory utilitiy routines found in MVGALL.OLB Version as of 31-Jan-85 Page 2 1.0 Check Memory Address _____ ______ _______ ********** * _mchec * ********** NAME: _mchec -- Check Memory Address SYNOPSIS: int _mcheck(adr) char *adr; /* address to check */ DESCRIPTION: _mcheck() examines a section of memory to be free'd, and if it can't be free'd, then an error message is displayed, and the program is aborted. BUGS: AUTHOR: Machiavelli Systems Page 3 _mchec Check Memory Address 2.0 Allocate Memory or Bust ________ ______ __ ____ ********** * zmallo * ********** NAME: zmallo -- Allocate Memory or Bust SYNOPSIS: int zmalloc(size) unsigned size; /* number of byte to allocate */ DESCRIPTION: zmalloc() allocates size bytes, and returns a pointer to the area allocated. If it can't allocate size bytes, an error message is displayed, and program execution is terminated. BUGS: AUTHOR: Machiavelli Systems Page 4 zmallo Allocate Memory or Bust 3.0 Free up Allocated Memory ____ __ _________ ______ ********** * zmfree * ********** NAME: zmfree -- Free up Allocated Memory SYNOPSIS: int zmfree(addr) int *addr; DESCRIPTION: zmfree() goes out, checks the memory you wish to free, if it's bad, an error message is displayed, and program executoion is aborted. If the memory specified is valid, then that memory is free'd. BUGS: AUTHOR: Machiavelli Systems Page 5 zmfree Free up Allocated Memory 4.0 Display a No Memory Panic Message _______ _ __ ______ _____ _______ ********** * znomem * ********** NAME: znomem -- Display a No Memory Panic Message SYNOPSIS: int znomem() DESCRIPTION: znomem() displays "no memory - call a programmer - +61(9)322-2777", and aborts program execution. BUGS: A waste of a routine... Just call error(). AUTHOR: Machiavelli Systems APPENDIX A MVGALL INDEX The following is a keyword in context index to the MVG memory routines The entry in the left-hand column is the title of the routine in the mvgmem documentation _mchec check Memory address zmallo allocate Memory or bust zmfree free up Allocated memory zmallo allocate Memory or bust _mchec check Memory address znomem message display a no Memory panic zmfree free up Allocated memory _mchec check Memory address zmallo allocate Memory or bust znomem display a no Memory panic message zmfree free up Allocated memory znomem a no Memory panic message display znomem display a no Memory panic message zmallo allocate Memory or bust znomem display a no Memory panic message zmfree free up Allocated memory