syedshan
Advanced Member level 1
- Joined
- Feb 27, 2012
- Messages
- 463
- Helped
- 27
- Reputation
- 54
- Reaction score
- 26
- Trophy points
- 1,308
- Location
- Jeonju, South Korea
- Activity points
- 5,134
hello every one,
My need is to aligned the memory by 4096, since this is the requirement of the dll I am using.
so previously it was no problem since just I used to have
but now since I want to share the memory using struct (for the reason of using the threads) hence I am stuck with what and how to do?
thanks
My need is to aligned the memory by 4096, since this is the requirement of the dll I am using.
so previously it was no problem since just I used to have
Code:
char *mem_buff = (char *)_aligned_malloc(sizeof(char)*XX, 4096);
but now since I want to share the memory using struct (for the reason of using the threads) hence I am stuck with what and how to do?
Code:
struct g_thread_param {
int thr_cnt ;
int indv_cnt ;
char mem_buff[XX]; //what to do to aligne this to 4096
} ;
thanks