0

I have a doubt regarding memory allocation in VXWorks.

It looks like VxWorks allocates a few bytes more than requested

Scenario 1: I request for 64 bytes. Vxworks allocates 66 bytes. Diff of 2 bytes

Scenario 2: I request for memory of 88 bytes. Vxworks allcoates 96 bytes.Diff of 8 bytes.

Shri
  • 11
  • 2
  • malloc generally does that, due to space required for metadata.You may additionally have a look at https://stackoverflow.com/questions/14923157/c-malloc-seems-to-allocate-more-then-im-requesting-array – finickyTunnel Jun 09 '17 at 04:09
  • Can you please describe two things: the way you are allocating memory and the way you are checking for real buffer size? – nnovich-OK Jun 09 '17 at 17:01

0 Answers0