Over 100% SRAM Used

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

So I built my application in Creator 2.2 for a CY8C38 chip (8kB ram). It says that I've used 15077 of 8192 bytes (184%) of my SRAM. 

   

 

   

I guess I'm confussed that it would bulid without errors and even run if I used 187%. Although I haven't tessted all features during run time. Is this some kind of error or will it let me use that much SRAM and not yell at me? I'll post the project if needed, but it's quite messy at the moment.

0 Likes
11 Replies
Anonymous
Not applicable

That's quite shocking.

   

 

   

I've never trusted those reports before because they were not very accurate. But over 80% is just too much.

   

Those usage reports are quite misleading and could make you choose a more expensive device with more RAM when you don't need it.

0 Likes
Anonymous
Not applicable

 BTW, Have you tried building it under Creator 3 ? Creator 3's reports are supposed to be more accurate (but should actually display more RAM usage)

0 Likes
Anonymous
Not applicable

 Didn't have this problem before. May be we can see what happened if you can post your project her.

0 Likes
Anonymous
Not applicable

I tried to update to Creator 3.0, but I was getting errors...that's another story. 

   

Is there a more accurate way to calcuate SRAM used?

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Maybe Bob can comment on this, re a malloc like function that returns currently

   

alolocated memory size ?

   

 

       

 

   

Regards, Dana.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked
        There are some settings in the System-tab: Stack and Heap usage which are not taken into account when the amount of memory used is calculated.   
I would suggest to reduce the heap to zero when you are not using malloc() and to check the amount of stack compared to your estimation.   
   
Bob   
0 Likes
Anonymous
Not applicable

@jram.....How could use have used more than the allocated SRAM?

   

I remember once when I was working on PSoC 3 and had written a code which needed more than the allocated SRAM of 8092 bytes. I tried to run the code and got the error that the size was not enough. So I had to move on to PSoC 5 which offers 65536 of SRAM.

   

Regards.

0 Likes
Anonymous
Not applicable

 If heap and and stack is an issue, then you should try PSoC5 as 8051 based PSoC3 may not be best suit for your application.

0 Likes
Anonymous
Not applicable

 So I installed PSoC Creator 3 on a virtual machine. When I built the project it said I was using around 90% or SRAM. I'm pushing it, but that's better than 180%. 🙂

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked
        @jram Why on a virtual machine? Creator 3 is co-existent with former versions, so you may install it on the same machine(s).   
   
Bob   
0 Likes
Anonymous
Not applicable

I tried installing Creator 3.0, but when I tried using it I got lots of errors when  trying to build my projects. No errors on the virtual machine.

   

 

   

I'll try installing it again when I get to a safe period between projects.

0 Likes