Fix nits
Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
This commit is contained in:
parent
f4bcef1113
commit
c4ccd0b6a1
@ -240,7 +240,6 @@ struct MemoryCellClocks {
|
||||
}
|
||||
|
||||
impl MemoryCellClocks {
|
||||
|
||||
/// Create a new set of clocks representing memory allocated
|
||||
/// at a given vector timestamp and index.
|
||||
fn new(alloc: VTimestamp, alloc_index: VectorIdx) -> Self {
|
||||
@ -676,7 +675,6 @@ pub struct VClockAlloc {
|
||||
}
|
||||
|
||||
impl VClockAlloc {
|
||||
|
||||
/// Create a new data-race detector for newly allocated memory.
|
||||
pub fn new_allocation(global: &MemoryExtra, len: Size, track_alloc: bool) -> VClockAlloc {
|
||||
let (alloc_timestamp, alloc_index) = if track_alloc {
|
||||
|
@ -24,9 +24,9 @@ pub fn main() {
|
||||
// 2. write
|
||||
unsafe {
|
||||
let j1 = spawn(move || {
|
||||
//Concurrent allocate the memory.
|
||||
//Uses relaxed semantics to not generate
|
||||
//a release sequence.
|
||||
// Concurrent allocate the memory.
|
||||
// Uses relaxed semantics to not generate
|
||||
// a release sequence.
|
||||
let pointer = &*ptr.0;
|
||||
pointer.store(Box::into_raw(Box::new(0usize)), Ordering::Relaxed);
|
||||
});
|
||||
|
@ -24,9 +24,9 @@ pub fn main() {
|
||||
// 2. write
|
||||
unsafe {
|
||||
let j1 = spawn(move || {
|
||||
//Concurrent allocate the memory.
|
||||
//Uses relaxed semantics to not generate
|
||||
//a release sequence.
|
||||
// Concurrent allocate the memory.
|
||||
// Uses relaxed semantics to not generate
|
||||
// a release sequence.
|
||||
let pointer = &*ptr.0;
|
||||
pointer.store(Box::into_raw(Box::new(0usize)), Ordering::Relaxed);
|
||||
});
|
||||
|
@ -27,9 +27,9 @@ pub fn main() {
|
||||
// 3. stack-deallocate
|
||||
unsafe {
|
||||
let j1 = spawn(move || {
|
||||
//Concurrent allocate the memory.
|
||||
//Uses relaxed semantics to not generate
|
||||
//a release sequence.
|
||||
// Concurrent allocate the memory.
|
||||
// Uses relaxed semantics to not generate
|
||||
// a release sequence.
|
||||
let pointer = &*ptr.0;
|
||||
{
|
||||
let mut stack_var = 0usize;
|
||||
|
@ -27,9 +27,9 @@ pub fn main() {
|
||||
// 3. stack-deallocate
|
||||
unsafe {
|
||||
let j1 = spawn(move || {
|
||||
//Concurrent allocate the memory.
|
||||
//Uses relaxed semantics to not generate
|
||||
//a release sequence.
|
||||
// Concurrent allocate the memory.
|
||||
// Uses relaxed semantics to not generate
|
||||
// a release sequence.
|
||||
let pointer = &*ptr.0;
|
||||
|
||||
let mut stack_var = 0usize;
|
||||
|
@ -27,9 +27,9 @@ pub fn main() {
|
||||
// 3. stack-deallocate
|
||||
unsafe {
|
||||
let j1 = spawn(move || {
|
||||
//Concurrent allocate the memory.
|
||||
//Uses relaxed semantics to not generate
|
||||
//a release sequence.
|
||||
// Concurrent allocate the memory.
|
||||
// Uses relaxed semantics to not generate
|
||||
// a release sequence.
|
||||
let pointer = &*ptr.0;
|
||||
{
|
||||
let mut stack_var = 0usize;
|
||||
|
@ -27,9 +27,9 @@ pub fn main() {
|
||||
// 3. stack-deallocate
|
||||
unsafe {
|
||||
let j1 = spawn(move || {
|
||||
//Concurrent allocate the memory.
|
||||
//Uses relaxed semantics to not generate
|
||||
//a release sequence.
|
||||
// Concurrent allocate the memory.
|
||||
// Uses relaxed semantics to not generate
|
||||
// a release sequence.
|
||||
let pointer = &*ptr.0;
|
||||
|
||||
let mut stack_var = 0usize;
|
||||
|
@ -29,9 +29,9 @@ pub fn main() {
|
||||
// 5. read-value
|
||||
unsafe {
|
||||
let j1 = spawn(move || {
|
||||
//Concurrent allocate the memory.
|
||||
//Uses relaxed semantics to not generate
|
||||
//a release sequence.
|
||||
// Concurrent allocate the memory.
|
||||
// Uses relaxed semantics to not generate
|
||||
// a release sequence.
|
||||
let pointer = &*ptr.0;
|
||||
|
||||
let mut stack_var = 0usize;
|
||||
|
@ -29,9 +29,9 @@ pub fn main() {
|
||||
// 5. write-value
|
||||
unsafe {
|
||||
let j1 = spawn(move || {
|
||||
//Concurrent allocate the memory.
|
||||
//Uses relaxed semantics to not generate
|
||||
//a release sequence.
|
||||
// Concurrent allocate the memory.
|
||||
// Uses relaxed semantics to not generate
|
||||
// a release sequence.
|
||||
let pointer = &*ptr.0;
|
||||
|
||||
let mut stack_var = 0usize;
|
||||
|
Loading…
x
Reference in New Issue
Block a user