Hi I have this question: Why when I\'m allocating memory with malloc for a float array, it allocate more space that i\'m requesting? For example in this code i\'m trying to
I would not be surprised if allocating heap memory does not fall into specific processor rules that addresses must be aligned on a long, quad, or other boundary.
So, if you requested 100 bytes of heap space, the OS may return more than you requested to satisfy alignment requirements of the processor. However, accessing more than the 100 bytes is considered undefined and can and probably will result in a lot of strange behavior you do not want.