Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: minor edits

When multiple threads must access or make modifications to a common variable, they may alsoWhen accessing an object, a thread may inadvertently access a seperate separate object in adjacent memory. This is an artifact of objects being stored compactly, with one byte possibly holding multiple variables.  This is a common optimization on word-addressed machines. Bit-fields are especially prone to this behavior because compilers are allowed to store multiple bit-fields in one addressable byte or word. Consequently, data races may exist not just on an object accessed by multiple threads but also on other objects sharing the same byte or word address.

...