This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to allocate 4k buffer in RAM

Hi ,

I am using PCA10001 board.

Now i want create 4k buffer in RAM. Which is good way allocate memory to 4k buffer.

Can i use dynamic(malloc function) or static memory allocation.

in my case code is also larger.

Regards Balaji

Parents
  • Now i want create 4k buffer in RAM. Which is good way allocate memory to 4k buffer.

    Can i use dynamic(malloc function) or static memory allocation.

    The SDK does not uses dynamic memory allocation, so if you wanted to use that you'd have to implement your own memory management scheme.

    If you have enough room, you can simply statically define your buffer, but 4KB sounds a bit excessive.

Reply
  • Now i want create 4k buffer in RAM. Which is good way allocate memory to 4k buffer.

    Can i use dynamic(malloc function) or static memory allocation.

    The SDK does not uses dynamic memory allocation, so if you wanted to use that you'd have to implement your own memory management scheme.

    If you have enough room, you can simply statically define your buffer, but 4KB sounds a bit excessive.

Children
Related