Page 1 of 1

Memory assignment

Posted: 03 Aug 2014 20:05
by r.zaimovic
Hello MikroElektronika

I came across weird behavior in my program and after some examination found that one array occupied less memory than it should (please see attachment).

Can you explain me this please?

I am using 18F8722 and MikroC Pro 6.0.0

Re: Memory assignment

Posted: 05 Aug 2014 15:26
by pwdixon
Funny how the length of Buffer1 would have taken the count to 0x03B6 which is the position for testvar1 and dow, it's almost like the table has mis-counted the position info somehow for both Buffer1 and testvar1 but then did manage to add 1 byte for dow.

Did the code work correctly? If it did then it could just be a table display update problem, if not then it's more serious. I guess you only looked because it failed to work correctly.

Can you post the source code definitions of these variables?

Re: Memory assignment

Posted: 05 Aug 2014 15:27
by pwdixon
Also, and I'm pretty sure it's the first thing ME will say, but why are you running an old version of the compiler, can you try this on the latest version?

Re: Memory assignment

Posted: 05 Aug 2014 22:00
by r.zaimovic
Code did not work correctly. Same thing is happening with latest version of compiler. however problem is solved after deleting all files from project folder except source files. I save those files just in case and I can send it if me wish to take a look.