home *** CD-ROM | disk | FTP | other *** search
- ' +----------------------------------------------------------------------+
- ' | |
- ' | BASWIZ Copyright (c) 1990-1993 Thomas G. Hanlin III |
- ' | |
- ' | The BASIC Wizard's Library |
- ' | |
- ' +----------------------------------------------------------------------+
-
- DECLARE SUB MAllocate0 (Bytes&, Ptr&, ErrCode%)
- DECLARE SUB MDeallocate0 (Ptr&, ErrCode%)
-
- DEFINT A-Z
-
- SUB MAllocate (Bytes&, Ptr&, ErrCode%)
- junk& = SETMEM(-Bytes& - 48&) ' make QB release memory
- MAllocate0 Bytes&, Ptr&, ErrCode% ' allocate what we need
- junk& = SETMEM(999999) ' release the rest back to QB
- END SUB
-
- SUB MDeallocate (Ptr&, ErrCode%)
- MDeallocate0 Ptr&, ErrCode% ' deallocate memory
- junk& = SETMEM(999999) ' release it back to QB
- END SUB
-