home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format 103
/
af103b.adf
/
ARexx
/
support.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-08-27
|
740b
|
41 lines
/* support.rexx - a low-level memory allocation test */
MEMF_CLEAR = '00010000'x
MEMF_CHIP = '00000002'x
SIZE=100000 /* memory size to allocate (arbitary amount) */
signal on break_c /* cause a branch to my script's own control-c handling routine */
if ~Show('L','rexxsupport.library') then
call AddLib('rexxsupport.library',0,-30,0)
memory=AllocMem(SIZE,BITOR(MEMF_CLEAR,MEMF_CHIP))
say SIZE 'bytes of zero''d chip mem allocated. Now try hitting control-C!'
/* now do a delay loop which user can break into... */
do i=1 to 40000
end
FreeMem(memory,SIZE)
quit:
say 'Bye...'
exit /* end of program */
break_c:
say 'user hit control-c so release memory before quitting'
FreeMem(memory,SIZE)
signal quit