This is starting to get me down ! Today, tried turning off all unnecessary network activity. No help.
Why does the Roku buffer up so much video ? After the movie started, I shut off the server and it still played for 10 minutes ! That's a lot of video buffers.
I did come up with a subroutine to display your memory allocations with totals.
Still a work in progress, need to define the actual size of each object type to get the total size used.
You can call it via eval( dump() ) or a subroutine before a planed crash.
Sub Dump()
g = GetGlobalAA()
Mem( g, 0, {} )
End Sub
Function Mem(g as object, lev as integer, p as object) as integer
l = string(lev*2," ")+"* "
if Type(g) = "roAssociativeArray"
for each n in g
v = g.Lookup( n )
t = Type( v )
if t = "roAssociativeArray"
z = 0
for each j in v
z = z + 1
end for
s = 32 * z
? l n " = " t z " Items"
mem( v, lev+1, p )
elseif t = "roArray"
s = 32 * v.Count()
? l n " = " t v.Count() " Items"
mem( v, lev+1, p )
elseif t = "String" or t = "roString"
s = Len(v)
? l n " = " t " " s " ["+v+"]"
elseif t = "ByteArray" or t = "roByteArray"
s = v.Count()
? l n " = " t " " s
elseif t = "Integer" or t = "roInteger" or t = "roInt"
s = 4
if n = invalid
? l t " [" v "]"
else
? l n " = " t " [" v.ToStr() "]"
end if
elseif t = "Boolean" or t = "roBoolean"
s = 4
if n = invalid
? l t " [" v "]"
else
? l n " = " t " [" v "]"
end if
elseif t = "Float" or t = "roFloat"
s = 4
? l n " = " t " [" v "]"
elseif t = "Double" or t = "roDouble"
s = 8
? l n " = " t " [" v "]"
elseif t = "Invalid" or t = "roInvalid"
s = 4
? l n " = " t
else
s = 0
? "* " n " Unknown type = " t
end if
if p.Lookup( t ) = invalid
p.AddReplace( t, 1 )
else
p.AddReplace( t, p.Lookup( t )+1 )
end if
if p.Lookup( "total" ) = invalid
p.AddReplace( "total", s )
else
p.AddReplace( "total", p.Lookup( "total" )+s )
end if
end for
else
for i=0 to g.Count()-1
v = g[i]
t = Type( v )
if t = "roAssociativeArray"
z = 0
for each n in v
z = z + 1
end for
s = 32 * z
? l i.ToStr() " = " t z " Items"
mem( v, lev+1, p )
elseif t = "roArray"
s = 32 * v.Count()
? l i.ToStr() " = " t v.Count() " Items"
mem( v, lev+1, p )
elseif t = "String" or t = "roString"
s = Len(v)
? l i.ToStr() " = " t s " ["+v+"]"
elseif t = "ByteArray" or t = "roByteArray"
s = v.Count()
? l i.ToStr() " = " t s
elseif t = "Integer" or t = "roInteger" or t = "roInt"
s = 4
? l i.ToStr() " = " t " [" v.ToStr() "]"
elseif t = "Boolean" or t = "roBoolean"
s = 4
? l i.ToStr() " = " t " [" v "]"
elseif t = "Float" or t = "roFloat"
s = 4
? l i.ToStr() " = " t " [" v "]"
elseif t = "Double" or t = "roDouble"
s = 8
? l i.ToStr() " = " t " [" v "]"
elseif t = "Invalid" or t = "roInvalid"
s = 4
? l i.ToStr() " = " t
else
s = 0
? "* " n " Unknown type = " t
end if
if p.Lookup( t ) = invalid
p.AddReplace( t, 1 )
else
p.AddReplace( t, p.Lookup( t )+1 )
end if
if p.Lookup( "total" ) = invalid
p.AddReplace( "total", s )
else
p.AddReplace( "total", p.Lookup( "total" )+s )
end if
end for
end if
if lev = 0
tot = p.Lookup("total")
p.Delete( "Total")
? "*"
items = 0
for each e in p
cnt = p.Lookup(e)
? e " = " cnt
items = items + cnt
end for
? "*"
? "Allocated " tot " bytes - total items " items
? "*"
end if
return lev
End Function