Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
This commit is contained in:
JCTyblaidd 2020-12-07 19:10:01 +00:00
parent f4bcef1113
commit c4ccd0b6a1
9 changed files with 24 additions and 26 deletions

View File

@ -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 {

View File

@ -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);
});

View File

@ -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);
});

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;