You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sizeof(data) is incorrect because data is a pointer, whose size is fixed (4 or 8 bytes). sizeof(*data) would be correct, but I think sizeof(ThreadData) is clearer, since this is the structure that is used.
profnandaa
changed the title
chap.4: clarification: sizeof(data) or sizeof(ThreadData), pg. 70 & 71
clarification: sizeof(data) or sizeof(ThreadData), pg. 70 & 71
May 15, 2023
On page 70 and 71:
Though in the code sample, you are using
sizeof(ThreadData)
:windowskernelprogrammingbook2e/Chapter04/Booster/Booster.cpp
Line 91 in e23f9bb
As much as both are
8
, it could be misleading since the pointer size will stay the same regardless of struct change.The text was updated successfully, but these errors were encountered: