Dynamic memory allocation

General discussion on mikroBasic PRO for PIC32.
Post Reply
Author
Message
Const50
Posts: 124
Joined: 28 Oct 2010 15:08
Location: West Siberia, Tomsk

Dynamic memory allocation

#1 Post by Const50 » 21 May 2015 10:33

I use PIC32MX575F512H. It has 64K RAM. But when I try to organize even 32K array, the program hangs-up when reachs the line of code "dim fdata as bite [50000]" at run-time. When I check SUMMARY I see: Static used 874 bytes 1.3%; Dyn available 64662 bytes 98.7%, Total 65536 bytes. I.e. my array doesn't allocated in RAM.
I first time meet this word "dynamic memory", because have no experience.
I've checked HEAP in Project Editor and set HEAP=60000.
After this in SUMMARY I've got Static used 60874 bytes 92.9%; Heap reserved 60000 bytes 91.6%; Dyn available -55338 bytes -84.4% (!!) Mysticism. What means this "-"??
As a fact - I can't use RAM (64K) at all.
Could somebody tell what to do to eliminate this run-time error? How to set all RAM as static?
Last edited by Const50 on 30 May 2015 15:47, edited 1 time in total.

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Dynamic memory allocation

#2 Post by filip » 29 May 2015 10:35

Hi,

I believe that you have opened a ticket regarding this issue, so we will continue there.

Regards,
Filip.

Const50
Posts: 124
Joined: 28 Oct 2010 15:08
Location: West Siberia, Tomsk

Re: Dynamic memory allocation

#3 Post by Const50 » 30 May 2015 15:40

I've sent the ticket but till no replay from the support dep.

Post Reply

Return to “mikroBasic PRO for PIC32 General”