# else
char * stack_top
= (char *)((word)GC_approx_sp() &
- ~(GC_sysinfo.dwAllocationGranularity - 1));
+ ~(word)(GC_sysinfo.dwAllocationGranularity - 1));
if (base == limit) return;
if (limit > stack_top && base < GC_stackbottom) {
/* Part of the stack; ignore it. */
# define modHBLKSZ(n) ((n) & (HBLKSIZE-1))
-# define HBLKPTR(objptr) ((struct hblk *)(((word) (objptr)) & ~(HBLKSIZE-1)))
-
+# define HBLKPTR(objptr) ((struct hblk *)(((word)(objptr)) \
+ & ~(word)(HBLKSIZE-1)))
# define HBLKDISPL(objptr) (((size_t) (objptr)) & (HBLKSIZE-1))
/* Round up allocation size (in bytes) to a multiple of a granule. */
# define SHARE_BYTES 2048
if (descr > SHARE_BYTES && GC_parallel
&& mark_stack_top < mark_stack_limit - 1) {
- int new_size = (descr/2) & ~(sizeof(word)-1);
+ word new_size = (descr/2) & ~(word)(sizeof(word)-1);
mark_stack_top -> mse_start = current_p;
mark_stack_top -> mse_descr = new_size + sizeof(word);
/* makes sure we handle */
struct roots * old;
GC_ASSERT(b <= e);
- b = (ptr_t)(((word)b + (sizeof(word) - 1)) & ~(sizeof(word) - 1));
+ b = (ptr_t)(((word)b + (sizeof(word) - 1)) & ~(word)(sizeof(word) - 1));
/* round b up to word boundary */
- e = (ptr_t)((word)e & ~(sizeof(word) - 1));
+ e = (ptr_t)((word)e & ~(word)(sizeof(word) - 1));
/* round e down to word boundary */
if (b >= e) return; /* nothing to do */
DCL_LOCK_STATE;
/* Quick check whether has nothing to do */
- if ((((word)b + (sizeof(word) - 1)) & ~(sizeof(word) - 1)) >=
- ((word)e & ~(sizeof(word) - 1)))
+ if ((((word)b + (sizeof(word) - 1)) & ~(word)(sizeof(word) - 1)) >=
+ ((word)e & ~(word)(sizeof(word) - 1)))
return;
LOCK();
DCL_LOCK_STATE;
/* Adjust the upper boundary for safety (round down) */
- e = (void *)((word)e & ~(sizeof(word) - 1));
+ e = (void *)((word)e & ~(word)(sizeof(word) - 1));
if (b == e) return; /* nothing to exclude? */
/* allocation lock held. */
struct sigaction act;
- size_t pgsz = (size_t)sysconf(_SC_PAGESIZE);
+ word pgsz = (word)sysconf(_SC_PAGESIZE);
GC_ASSERT((word)bound >= pgsz);
GC_ASSERT(I_HOLD_LOCK());
static volatile int firstpass;
struct sigaction act;
- size_t pgsz = (size_t)sysconf(_SC_PAGESIZE);
+ word pgsz = (word)sysconf(_SC_PAGESIZE);
GC_ASSERT((word)bound >= pgsz);
GC_ASSERT(I_HOLD_LOCK());
ptr_t GC_SysVGetDataStart(size_t max_page_size, ptr_t etext_addr)
{
word text_end = ((word)(etext_addr) + sizeof(word) - 1)
- & ~(sizeof(word) - 1);
+ & ~(word)(sizeof(word) - 1);
/* etext rounded to word boundary */
word next_page = ((text_end + (word)max_page_size - 1)
& ~((word)max_page_size - 1));
ptr_t GC_FreeBSDGetDataStart(size_t max_page_size, ptr_t etext_addr)
{
word text_end = ((word)(etext_addr) + sizeof(word) - 1)
- & ~(sizeof(word) - 1);
+ & ~(word)(sizeof(word) - 1);
/* etext rounded to word boundary */
volatile word next_page = (text_end + (word)max_page_size - 1)
& ~((word)max_page_size - 1);
/* There are also unconfirmed rumors of other */
/* problems, so we dodge the issue. */
result = (ptr_t)(((word)GlobalAlloc(0, SIZET_SAT_ADD(bytes, HBLKSIZE))
- + HBLKSIZE - 1) & ~(HBLKSIZE - 1));
+ + HBLKSIZE - 1) & ~(word)(HBLKSIZE - 1));
} else {
/* VirtualProtect only works on regions returned by a */
/* single VirtualAlloc call. Thus we allocate one */
}
}
}
- bufp = (char *)(((word)bufp + (sizeof(long)-1)) & ~(sizeof(long)-1));
+ bufp = (char *)(((word)bufp + (sizeof(long)-1))
+ & ~(word)(sizeof(long)-1));
}
# ifdef DEBUG_DIRTY_BITS
GC_log_printf("Proc VDB read done.\n");