You did not provide all the necessary data necessary to answer this question.
So, here is an example where you need to fill in:
struct Element { unsigned long long x; ... }; void* ptrArray[TOTAL_SIZE];
If you work on the 32-bit platform AND , you have defined an odd number of pointers, then you will need a 4-byte addition to ensure that the 8-byte variable is aligned at the beginning of each element.
Also, note that if you want to store more than one element in an array, the size of the element itself must be a multiple of 8 bytes for this to work.
If you want to abandon the addition altogether, then you will need memcpy use the element from the array and to the array every time you need to access (read or write) this particular element.
barak manos
source share