-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -311,8 +311,9 @@ impl MTThread { | |
/// The innards of a meta-tracer thread. | ||
struct MTThreadInner { | ||
mt: MT, | ||
/// A value that uniquely identifies a thread and that is guaranteed not to overlap with | ||
/// PHASE_TAG. For simplicities sake this is a pointer to a malloc'd chunk of memory. | ||
/// A value that uniquely identifies a thread. For simplicities sake this is a pointer to a | ||
/// malloc'd chunk of memory since that pointer's alignment means that we won't conflict with | ||
/// the bits set in PHASE_TAG. | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ltratt
Author
Contributor
|
||
tid: *mut u8, | ||
hot_threshold: HotThreshold, | ||
#[allow(dead_code)] | ||
|
How about:
All of this talk of alignment got me reading the
malloc(3)
man pages. The alignment guarantees are vague, or at least oddly worded on both Linux and OpenBSD.Linux:
OpenBSD:
So does that mean word-aligned?
What is the alignment of the pointer returned when we ask to allocate one byte?
[I also found
alloc_aligned(3)
which does an allocation at an alignment of your choosing. Could be useful in the future?]