Re: memory

new topic     » goto parent     » topic index » view thread      » older message » newer message

Howdy Kat!

Perhaps it would be better, although of course slower, if you left the
data on your drive till you needed it.

-- untested code
integer iByteIn, iFileHandle

iFileHandle = open("thedata.dat", "r")
if iFileHandle = -1 then
	puts(1, "well hell...\n")
	return
end if
iByteIn = 0
data = {}
while iByteIn != -1 do
	iByteIn = getc(iFileHandle)
	if (iByteIn != -1) and (iByteIn != 0) then
		data &= iByteIn
	end if
end while
close(iFileHandle)
-- end untested code

That would be slower, but it would keep all that data out of memory.  Or
maybe ship it in using bite-sized pieces?

Travis Beaty
Claude, Texas.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu