Page 1 of 1

Alignment of CORE_TEMP_SHARED_DATA.

Posted: Tue Jul 28, 2009 3:51 am
by CoreTemp-User315
What is the field alignment of the CORE_TEMP_SHARED_DATA structure described at http://www.alcpu.com/CoreTemp/developers.html? Unless I'm missing it, it doesn't say it on the page.

Specifically, are ucFahrenheit and ucDeltaToTjMax adjacent in memory, or is there any padding between them?

Thanks.

Posted: Tue Jul 28, 2009 12:34 pm
by CoreTemp-User315
It appears to be 4 bytes, for anybody reading this, e.g. in VC++ you'd want to surround the structure definition with:

Code: Select all

#pragma pack (push, 4)

struct CORE_TEMP_SHARED_DATA {
  ...
};

#pragma pack (pop)