Use layout size instead of heap size in dealloc
alloc uses the layout size (in bytes), so dealloc also needs to use
that.  Additionally, `oversize_threshold` was in bytes, so compare it
to the word `size` was incorrect.
@@ -179,7 +179,8 @@ impl ProcessHeapAlloc {
/// Deallocate a process heap, releasing the memory back to the operating system
pub unsafe fn dealloc(&self, heap: *mut Term, size: usize) {
let layout = self.heap_layout(size);
- if size > self.oversized_threshold {
+
+ if layout.size() > self.oversized_threshold {
// Deallocate oversized heap
Self::dealloc_oversized_heap(heap, layout);
} else {
