We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7db759d commit 50f9135Copy full SHA for 50f9135
cheney-play.rs
@@ -100,10 +100,11 @@ impl Chunk {
100
}
101
102
unsafe fn free_all(&mut self) {
103
+ use std::libc;
104
let mut ptr = self.span.start;
105
let mut next = self.next;
106
loop {
- global_heap::free_raw(ptr);
107
+ global_heap::free_raw(ptr as *libc::c_void);
108
match next {
109
None => break,
110
Some(p) => { ptr = (*p).span.start; next = (*p).next; }
@@ -306,7 +307,10 @@ impl Drop for Gc {
306
307
unsafe {
308
self.normal_chunks.free_all();
309
match self.large_objects.take() {
- None => {}, Some(c) => c.free_all(),
310
+ None => {}, Some(c) => {
311
+ let c : *mut Chunk = cast::transmute(c);
312
+ (*c).free_all()
313
+ }
314
315
316
0 commit comments