Alignment of CORE_TEMP_SHARED_DATA.

Updates on developement of new features and user input/requests

Moderator: imposter

Post Reply
CoreTemp-User315
Registered User
Registered User
Posts: 5
Joined: Thu Jan 01, 1970 12:00 am

Alignment of CORE_TEMP_SHARED_DATA.

Post 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.

CoreTemp-User315
Registered User
Registered User
Posts: 5
Joined: Thu Jan 01, 1970 12:00 am

Post 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)

Post Reply

Return to “Core Temp - Development”