Memory limit in variables??

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10354
Joined: Wed May 06, 2009 2:28 pm

Memory limit in variables??

Post by dunbarx » Thu Mar 19, 2015 11:03 pm

I ran up against this in a thread on the use list, about populations of cities.

The following will fail if the repeat index is greater than 27:

Code: Select all

on mouseUp
   put "1234" into temp
   repeat 27
      put temp & return after temp
   end repeat
   answer the length of temp
end mouseUp
The barrier seems to be about a length of 1,000,000,000. OSX 10.9, LC 6.7.

Craig Newman

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10057
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Memory limit in variables??

Post by FourthWorld » Fri Mar 20, 2015 1:02 am

Confirmed on Mac. On Ubuntu in v6.7 I can go up to 28, but at 29 it throws an abort execution error.

With v7 on Linux I can go up to 29, but the resulting length shows as -1610612737.

At 30 it simply crashes on Linux, but at that point we're well past the 4GB limit of addressable space the current LC engine is able to understand internally.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10354
Joined: Wed May 06, 2009 2:28 pm

Re: Memory limit in variables??

Post by dunbarx » Fri Mar 20, 2015 4:31 am

Richard.

I had thought originally that I simply ran into the 4GB limit. But it is about a sixth of that. Should I inform Scotland?

Craig

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10057
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Memory limit in variables??

Post by FourthWorld » Fri Mar 20, 2015 5:23 am

dunbarx wrote:I had thought originally that I simply ran into the 4GB limit. But it is about a sixth of that. Should I inform Scotland?
Wouldn't hurt. They might be able to exceed that, or at very last we'll learn why it does this.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10354
Joined: Wed May 06, 2009 2:28 pm

Re: Memory limit in variables??

Post by dunbarx » Fri Mar 20, 2015 3:53 pm

Filed bug report 15041.

Craig

Post Reply