Fix a lot of things and implement gc

This commit is contained in:
2019-05-29 21:06:42 +02:00
parent c3876da74f
commit 84bdcf4b20
16 changed files with 146 additions and 55 deletions

View File

@@ -11,7 +11,7 @@ use stack::Stack;
use Result;
#[cfg(feature = "bonus:heap")]
use heap::Heap;
use heap::Heaps;
#[cfg(feature = "bonus:network")]
use netstack::NetStack;
use std::convert::TryInto;
@@ -28,7 +28,7 @@ pub struct Machine {
#[cfg(feature = "bonus:network")]
pub net: NetStack,
#[cfg(feature = "bonus:heap")]
pub heap: Heap,
pub heap: Heaps,
pub stream_in: Box<Read + Send + Sync>,
pub stream_out: Arc<Mutex<Write + Send + Sync>>,
@@ -49,7 +49,7 @@ impl Machine {
net: NetStack::new(),
#[cfg(feature = "bonus:heap")]
heap: Heap::new(),
heap: Heaps::new(),
}
}