Graphics 640,480,0
While Not KeyHit(KEY_ESCAPE)
If KeyHit(KEY_SPACE)
file = ReadFile("test.map")
CloseFile file
EndIf
Cls
DrawText MemAlloced(),0,0
FlushMem
Flip
Wend
End
Memory consumption increases with each read and closed file. test.map can be any file of your choice.