Code: Select all
dim a (1 to 1024,0 to 768) as ubyte
dim b (1 to 1024,0 to 768) as ubyte
Version: 0.24.0 (WIN32)
Code: Select all
dim a (1 to 1024,0 to 768) as ubyte
dim b (1 to 1024,0 to 768) as ubyte
Code: Select all
Dim Shared a (1 To 1024,0 To 768) As Ubyte
Dim Shared b (1 To 1024,0 To 768) As Ubyte
Code: Select all
dim shared a (1 to 1024,0 to 768) as ubyte
dim shared b (1 to 1024,0 to 768) as ubyte
print "Stack used without Shared ",(2*1024*769 *sizeof(ubyte)/1024)/1024 & " Mb"
print "Default Stack ",1 & " Mb"
sleep
An other solution is to use STATIC (if you don't want the arrays to be SHARED)Richard wrote:Your arrays are too big for the stack. Increase the stack size or make them shared.
Code: Select all
STATIC a (1 To 1024,0 To 768) As Ubyte
STATIC b (1 To 1024,0 To 768) As Ubyte
Code: Select all
dim as ubyte a(),b()
redim as ubyte a(1 to 1024,0 to 768),b(1 to 1024,0 to 768)