From e782f763ce807af84d5f3011717673e2bc4e22d9 Mon Sep 17 00:00:00 2001 From: Cassie Jones Date: Sun, 3 Jan 2021 02:50:27 -0500 Subject: [PATCH] [rt] Misc small cleanups --- rt/src/lam.rs | 3 ++- rt/src/lib.rs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/rt/src/lam.rs b/rt/src/lam.rs index 72fd667..67f2f9e 100644 --- a/rt/src/lam.rs +++ b/rt/src/lam.rs @@ -91,7 +91,8 @@ pub unsafe extern "C" fn ivy_app_mut(fun: Obj, arg: Obj) -> Obj { impl ObjLam { pub(crate) fn size_of(params: u16, upvars: u16) -> usize { - core::mem::size_of::() + params as usize * 8 + upvars as usize * 8 + let obj_size = core::mem::size_of::(); + core::mem::size_of::() + params as usize * obj_size + upvars as usize * obj_size } pub(crate) fn size(&self) -> usize { diff --git a/rt/src/lib.rs b/rt/src/lib.rs index 692d3dc..684171e 100644 --- a/rt/src/lib.rs +++ b/rt/src/lib.rs @@ -145,6 +145,7 @@ impl Obj { } unsafe fn dealloc(self) { + trace!("FREE {:016x}", self.int); if !self.is_box() { return; } -- 2.47.0