From 4315afffae820bb8c8355d1c6f027f9248c199e3 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Thu, 30 Jun 2011 01:01:53 +0000 Subject: [PATCH] another bug fix --- Robust/src/Runtime/bamboo/markbit.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Robust/src/Runtime/bamboo/markbit.h b/Robust/src/Runtime/bamboo/markbit.h index afe82af6..a86349a9 100644 --- a/Robust/src/Runtime/bamboo/markbit.h +++ b/Robust/src/Runtime/bamboo/markbit.h @@ -58,6 +58,22 @@ static inline unsigned int checkMark(void *ptr) { return (gcmarktbl[hibits]<>4; + unsigned INTPTR lobits=(alignsize&15)<<1; + unsigned INTPTR mask=MARKMASK>>lobits; + BAMBOO_ENTER_RUNTIME_MODE_FROM_CLIENT(); + unsigned INTPTR mark=(gcmarktbl[hibits])&mask; + if (!mark) { + gcmarktbl[hibits]|=(OBJMASK>>lobits); + } + BAMBOO_ENTER_CLIENT_MODE_FROM_RUNTIME(); + return mark; +} + /* Set length in units of ALIGNSIZE */ static inline void setLength(void *ptr, unsigned int length) { -- 2.34.1