Benign cargo Download

mod.rs

Rust test marker or harnessRust calls mem::transmute
SHA-256ca145f774a18d94c196b4bb9489cfe5d70f21506b1e3acdaf9524b0f5478cde0
MaleculeH(Db)Md(Pa)

Evidence

English function-word token "for" lines 1–5
1//! Epoch-based memory management
2//!
3//! This module provides fast, easy to use memory management for lock free data
4//! structures. It's inspired by [Keir Fraser's *epoch-based
5//! reclamation*](h …
English function-word token "the" lines 5–12
5:37… .ac.uk/techreports/UCAM-CL-TR-579.pdf).
6//!
7//! The basic problem this is solving is the fact that when one thread has
8//! removed a node from a data structure, other threads may still have pointers
9//! to that node (in the form of snapshots that will be validated through things
10//! like compare-and-swap), so the memory cannot be immediately freed. Put differently:
11//!
12//! 1. There are two sou …
imports self::atomic::Atomic lines 133–146
133:8… al;
134mod participant;
135mod participants;
136
137pub use self::atomic::Atomic;
138pub use self::guard::{pin, Guard};
139
140use std::ops::{Deref, DerefMut};
141use std::ptr;
142use std::mem;
143
144/// Like `Box<T>`: an owned, heap-allocated data value of type `T`.
145pub struct Owned<T> {
146 …
Rust calls mem::transmute lines 201–209
201:5… else {
202 Some(Shared {
203 data: mem::transmute::<*mut T, &T>(raw)
204 })
205 }
⋯4 lines
imports mem::epoch lines 213–235
⋯9 lines
222
223
224#[cfg(test)]
225mod test {
226 use std::sync::atomic::Ordering;
227 use super::*;
228 use mem::epoch;
229
230 #[test]
231 fn test_no_drop() {
232 static mut DROPS: i32 = 0;
233 struct Test;
234 impl Drop for Test {
235 fn dro …

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.