Your Digital Media Has Never Looked So Good

 
EnTerr
** Valued Community Member **
Topic Author
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

YAWRR: A chess-related death

Tue Apr 29, 2014 1:08 pm

In today's episode of our award-seeking series "Yet Another Way to Reboot Roku", we have a variation of the ancient "rice and chessboard problem"
s="1": for i=1 to 99: ?i: s=s+s: next

It will pass away quietly at around 27-28. This is one (terminal) way to estimate the amount of free memory.
 
User avatar
RokuJoel
Posts: 1758
Joined: Mon Nov 14, 2011 5:22 pm

Re: YAWRR: A chess-related death

Tue Apr 29, 2014 2:37 pm

Nice. Note that on Legacy devices:

Out of Memory when doing string operation. (runtime error &h1a) in ...AA7qjxTe/pkg:/source/test.brs(3)

003: s="1": for i=1 to 99: ?i: s=s+s: next
Backtrace:
Function main() As
file/line: /tmp/plugin/D...AA7qjxTe/pkg:/source/test.brs(3)

Local Variables:
global &h0020 rotINTERFACE:ifGlobal
m &h0010 bsc:roAssociativeArray, refcnt=2
s &h8010 bsc:roString (2.1 was String), refcnt=1
i &h0002 Integer val:27
 
EnTerr
** Valued Community Member **
Topic Author
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

Re: YAWRR: A chess-related death

Tue Apr 29, 2014 3:07 pm

RokuJoel wrote:
Nice. Note that on Legacy devices:
Out of Memory when doing string operation. (runtime error &h1a)
Yep. Olden but golden. "They don't build them like that anymore" 8)

I can has cheeze-bug-er?
 
User avatar
RokuJoel
Posts: 1758
Joined: Mon Nov 14, 2011 5:22 pm

Re: YAWRR: A chess-related death

Wed Apr 30, 2014 11:25 am

I can haz filed bug.

- Joel
 
EnTerr
** Valued Community Member **
Topic Author
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

Re: YAWRR: A chess-related death

Thu May 01, 2014 10:58 am

gracias!

Who is online

Users browsing this forum: No registered users and 6 guests