We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am sampling a signal and would like to store values in an array. Array is storing 50000 samples values. I would like to know the space occupied by this array variable how can i know ? where can I know ?
In general i presumed if i am storing as uint16_t it would be; each sample takes 2 bytes, 2*50,000= 100KBytes. Is this true for ARM Compiler?or Am i wrong?
Also, If i declare them dynamically, where do they get stored ?
I am using STM32F4 DK.
- Thanks, Ashok
uint16_t elements will also take 2 bytes in the ARM universe. See sizeof() Dynamic memory is allocated from the HEAP The heap size is declared in the startup.s file, RAM would need to be large enough to accomodate or linker will throw an error.