I use STM32F103RD(64KB SRAM),But I can't use the last 4KB RAM?

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

cross mob
chch_2120956
Level 3
Level 3
First like received First like given

Dear,

    I use MCU STM32F103RD(64KB SRAM),when I have used 60KB  I call malloc(10) will fail ,can't get space ?

Thanks a lot !!!

0 Likes
1 Solution
GregG_16
Employee
Employee
50 sign-ins 25 sign-ins 25 comments on KBA

Hello,

Since MALLOC will allocate 4K blocks and runs in virtual memory, sometimes you can have fragments.  (Usually not an issue in systems with huge memory.)

Things like "scan results" and other functions rely on MALLOC, so it is best not to use every last bit or rely on it too heavily. 

Hope this helps.

View solution in original post

0 Likes
5 Replies