Login | Register

Alignment of CORE_TEMP_SHARED_DATA.

Updates on developement of new features and user input/requests

Moderator: imposter

  • Author
    Message

Alignment of CORE_TEMP_SHARED_DATA.

Postby CoreTemp-User315 » Tue Jul 28, 2009 3:51 am

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

Postby CoreTemp-User315 » Tue Jul 28, 2009 12:34 pm

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)
CoreTemp-User315
Registered User
Registered User
 
Posts: 5
Joined: Thu Jan 01, 1970 12:00 am

Return to Core Temp - Development

Who is online

Users browsing this forum: No registered users and 1 guest