home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
basic
/
baswiz18.zip
/
BW$BAS.ZIP
/
MEMORYQ.BAS
< prev
next >
Wrap
BASIC Source File
|
1992-08-29
|
1KB
|
24 lines
' +----------------------------------------------------------------------+
' | |
' | BASWIZ Copyright (c) 1990-1992 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