another attempt at dealing with struct alignment using calculations based on sizeof(CS_VAR_MEM)