home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-386-Vol-2of3.iso
/
b
/
baswiz19.zip
/
BW$BAS.ZIP
/
MEMORYQ.BAS
< prev
next >
Wrap
BASIC Source File
|
1993-01-29
|
1KB
|
24 lines
' +----------------------------------------------------------------------+
' | |
' | 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