Hi I am trying to malloc align each location of an array to 128 bits.
I am using the method malloc_align in linux to align arrays and so on.
But in this case I want to align each position of an array to 128 bits

for(i=0;i<size;i++){

//N=7 2^N=128
array=malloc_align(sizeof(double),7) ; //wont work
any suggestions ???
thanks

>>/N=7 2^N=128

That is bytes, not bits (see this link). 128 bits is 16 bytes on computers where 1 byte is 8 bits.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.