aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_gc.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2010-07-22 15:31:51 +0200
committerSverker Eriksson <[email protected]>2010-07-22 15:31:51 +0200
commit78bb45a531e9218e19e6faebd666355752fbfdb3 (patch)
tree8ded6b9e6d078ebc8ce6e1ef1def3f176582857a /erts/emulator/beam/erl_gc.c
parent9267b2dc792c0a7632a0dcdc0a49510eb13e465e (diff)
downloadotp-78bb45a531e9218e19e6faebd666355752fbfdb3.tar.gz
otp-78bb45a531e9218e19e6faebd666355752fbfdb3.tar.bz2
otp-78bb45a531e9218e19e6faebd666355752fbfdb3.zip
Mending halfword heap emulator
Diffstat (limited to 'erts/emulator/beam/erl_gc.c')
-rw-r--r--erts/emulator/beam/erl_gc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c
index e9411389a0..adc50675bf 100644
--- a/erts/emulator/beam/erl_gc.c
+++ b/erts/emulator/beam/erl_gc.c
@@ -146,6 +146,9 @@ erts_init_gc(void)
ASSERT(offsetof(ProcBin,thing_word) == offsetof(struct erl_off_heap_header,thing_word));
ASSERT(offsetof(ProcBin,thing_word) == offsetof(ErlFunThing,thing_word));
ASSERT(offsetof(ProcBin,thing_word) == offsetof(ExternalThing,header));
+ ASSERT(offsetof(ProcBin,size) == offsetof(struct erl_off_heap_header,size));
+ ASSERT(offsetof(ProcBin,size) == offsetof(ErlSubBin,size));
+ ASSERT(offsetof(ProcBin,size) == offsetof(ErlHeapBin,size));
ASSERT(offsetof(ProcBin,next) == offsetof(struct erl_off_heap_header,next));
ASSERT(offsetof(ProcBin,next) == offsetof(ErlFunThing,next));
ASSERT(offsetof(ProcBin,next) == offsetof(ExternalThing,next));
@@ -2111,9 +2114,9 @@ sweep_off_heap(Process *p, int fullsweep)
int to_new_heap = !in_area(ptr, oheap, oheap_sz);
ASSERT(to_new_heap == !seen_mature || (!to_new_heap && (seen_mature=1)));
if (to_new_heap) {
- bin_vheap += ptr->u.size / sizeof(Eterm);
+ bin_vheap += ptr->size / sizeof(Eterm);
} else {
- BIN_OLD_VHEAP(p) += ptr->u.size / sizeof(Eterm); /* for binary gc (words)*/
+ BIN_OLD_VHEAP(p) += ptr->size / sizeof(Eterm); /* for binary gc (words)*/
}
link_live_proc_bin(&shrink, &prev, &ptr, to_new_heap);
}
@@ -2157,7 +2160,7 @@ sweep_off_heap(Process *p, int fullsweep)
ASSERT(in_area(ptr, oheap, oheap_sz));
ASSERT(!IS_MOVED_BOXED(ptr->thing_word));
if (ptr->thing_word == HEADER_PROC_BIN) {
- BIN_OLD_VHEAP(p) += ptr->u.size / sizeof(Eterm); /* for binary gc (words)*/
+ BIN_OLD_VHEAP(p) += ptr->size / sizeof(Eterm); /* for binary gc (words)*/
link_live_proc_bin(&shrink, &prev, &ptr, 0);
}
else {