i have those code
#define CACHELINE 64
#define ALIGNMENT 16
#define ALIGNC __declspec(align(CACHELINE))
#define ALIGN __declspec(align(ALIGNMENT))
typedef ALIGN struct Vector4 VECTOR3;
ALIGNC struct SectorObject
many other members
SectorObject also has a constructor
in the code this object is created using "new"
struct SectorObject *pobj = new SectorObject;
my problem is that "O_Glide" is not 16 byte aligned and i cant use aligned SSE memory read/writes.
The question is how can i align "O_Glide" correctly?
I know i can use _aligned_malloc but this wont call the constructor. So is there a easy solution for this "common" problem?