diff options
| author | Tim Diekmann <tim.diekmann@3dvision.de> | 2020-03-25 21:12:12 +0100 |
|---|---|---|
| committer | Tim Diekmann <tim.diekmann@3dvision.de> | 2020-03-26 17:14:12 +0100 |
| commit | 03b055b0b4dcf304cd3c5e7a1c6e68fea91584a9 (patch) | |
| tree | 756da5c6b9cc313eae56f2e6c1af896597f7facf /src/test/ui/allocator | |
| parent | bfbdb5f06fcff7939825c33ce573b8f92b362c40 (diff) | |
| download | rust-03b055b0b4dcf304cd3c5e7a1c6e68fea91584a9.tar.gz rust-03b055b0b4dcf304cd3c5e7a1c6e68fea91584a9.zip | |
Remove alignment from `MemoryBlock`
Diffstat (limited to 'src/test/ui/allocator')
| -rw-r--r-- | src/test/ui/allocator/custom.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/allocator/xcrate-use.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/test/ui/allocator/custom.rs b/src/test/ui/allocator/custom.rs index 63b1b2fbb8b..8f894c5db5d 100644 --- a/src/test/ui/allocator/custom.rs +++ b/src/test/ui/allocator/custom.rs @@ -40,7 +40,7 @@ fn main() { let memory = Global.alloc(layout.clone(), AllocInit::Uninitialized).unwrap(); helper::work_with(&memory.ptr()); assert_eq!(HITS.load(Ordering::SeqCst), n + 1); - Global.dealloc(memory); + Global.dealloc(memory.ptr(), layout); assert_eq!(HITS.load(Ordering::SeqCst), n + 2); let s = String::with_capacity(10); @@ -52,7 +52,7 @@ fn main() { let memory = System.alloc(layout.clone(), AllocInit::Uninitialized).unwrap(); assert_eq!(HITS.load(Ordering::SeqCst), n + 4); helper::work_with(&memory.ptr()); - System.dealloc(memory); + System.dealloc(memory.ptr(), layout); assert_eq!(HITS.load(Ordering::SeqCst), n + 4); } } diff --git a/src/test/ui/allocator/xcrate-use.rs b/src/test/ui/allocator/xcrate-use.rs index d4f8b4247b1..689804bde86 100644 --- a/src/test/ui/allocator/xcrate-use.rs +++ b/src/test/ui/allocator/xcrate-use.rs @@ -23,13 +23,13 @@ fn main() { let memory = Global.alloc(layout.clone(), AllocInit::Uninitialized).unwrap(); helper::work_with(&memory.ptr()); assert_eq!(GLOBAL.0.load(Ordering::SeqCst), n + 1); - Global.dealloc(memory); + Global.dealloc(memory.ptr(), layout); assert_eq!(GLOBAL.0.load(Ordering::SeqCst), n + 2); let memory = System.alloc(layout.clone(), AllocInit::Uninitialized).unwrap(); assert_eq!(GLOBAL.0.load(Ordering::SeqCst), n + 2); helper::work_with(&memory.ptr()); - System.dealloc(memory); + System.dealloc(memory.ptr(), layout); assert_eq!(GLOBAL.0.load(Ordering::SeqCst), n + 2); } } |
