tigrot Well-Known Member Licensed User Longtime User May 12, 2018 #1 Hi everybody: I have this sub beginning: Code: Copy Dim ctx As Int=0 Log(StackBufferUsage) Dim r(10) As Record Dim raf As RandomAccessFile Dim buffer(18) As Byte Dim totpezzi As ULong=0 Dim totallarmi As ULong=0 raf.Initialize(buffer,True) Log(StackBufferUsage) Record is a Type 18 bytes long I have a StackbufferUsage of 150 on both logs. I don't understand why. There should be a big difference Has anybody an explanation? Regards Mauro
Hi everybody: I have this sub beginning: Code: Copy Dim ctx As Int=0 Log(StackBufferUsage) Dim r(10) As Record Dim raf As RandomAccessFile Dim buffer(18) As Byte Dim totpezzi As ULong=0 Dim totallarmi As ULong=0 raf.Initialize(buffer,True) Log(StackBufferUsage) Record is a Type 18 bytes long I have a StackbufferUsage of 150 on both logs. I don't understand why. There should be a big difference Has anybody an explanation? Regards Mauro
tigrot Well-Known Member Licensed User Longtime User May 12, 2018 #2 Found explanation. Local variables are allocated in stack not in stackbuffer. Better to study B4R implementation. Upvote 0
Found explanation. Local variables are allocated in stack not in stackbuffer. Better to study B4R implementation.