From: bdemsky Date: Thu, 30 Jun 2011 01:01:53 +0000 (+0000) Subject: another bug fix X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4315afffae820bb8c8355d1c6f027f9248c199e3;p=IRC.git another bug fix --- 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) {