void * op;
if (n > GC_max_fast_bytes) return GC_malloc(n);
- flh = GC_objfreelist_ptr + nwords;
- if (0 == (op = *flh)) {
+ flh = &GC_objfreelist_ptr[nwords];
+ op = *flh;
+ if (0 == op) {
return GC_aux::GC_out_of_line_malloc(nwords, GC_NORMAL);
}
*flh = GC_obj_link(op);
void * op;
if (n > GC_max_fast_bytes) return GC_malloc_atomic(n);
- flh = GC_aobjfreelist_ptr + nwords;
- if (0 == (op = *flh)) {
+ flh = &GC_aobjfreelist_ptr[nwords];
+ op = *flh;
+ if (0 == op) {
return GC_aux::GC_out_of_line_malloc(nwords, GC_PTRFREE);
}
*flh = GC_obj_link(op);
GC_free(p);
} else {
size_t nwords = GC_round_up(n);
- void ** flh = GC_objfreelist_ptr + nwords;
+ void ** flh = &GC_objfreelist_ptr[nwords];
+
GC_obj_link(p) = *flh;
memset(reinterpret_cast<char *>(p) + GC_bytes_per_word, 0,
GC_bytes_per_word * (nwords - 1));
GC_free(p);
} else {
size_t nwords = GC_round_up(n);
- void ** flh = GC_aobjfreelist_ptr + nwords;
+ void ** flh = &GC_aobjfreelist_ptr[nwords];
+
GC_obj_link(p) = *flh;
*flh = p;
GC_aux::GC_bytes_recently_freed += nwords * GC_bytes_per_word;
void * op;
if (n > GC_max_fast_bytes) return GC_malloc_uncollectable(n);
- flh = GC_uobjfreelist_ptr + nwords;
- if (0 == (op = *flh)) {
+ flh = &GC_uobjfreelist_ptr[nwords];
+ op = *flh;
+ if (0 == op) {
return GC_aux::GC_out_of_line_malloc(nwords, GC_UNCOLLECTABLE);
}
*flh = GC_obj_link(op);
void * op;
if (n > GC_max_fast_bytes) return GC_malloc_atomic_uncollectable(n);
- flh = GC_auobjfreelist_ptr + nwords;
- if (0 == (op = *flh)) {
+ flh = &GC_auobjfreelist_ptr[nwords];
+ op = *flh;
+ if (0 == op) {
return GC_aux::GC_out_of_line_malloc(nwords, GC_AUNCOLLECTABLE);
}
*flh = GC_obj_link(op);
GC_free(p);
} else {
size_t nwords = GC_round_up_uncollectable(n);
- void ** flh = GC_uobjfreelist_ptr + nwords;
+ void ** flh = &GC_uobjfreelist_ptr[nwords];
+
GC_obj_link(p) = *flh;
*flh = p;
GC_aux::GC_uncollectable_bytes_recently_freed +=
GC_free(p);
} else {
size_t nwords = GC_round_up_uncollectable(n);
- void ** flh = GC_auobjfreelist_ptr + nwords;
+ void ** flh = &GC_auobjfreelist_ptr[nwords];
+
GC_obj_link(p) = *flh;
*flh = p;
GC_aux::GC_uncollectable_bytes_recently_freed +=
for (i = 1; i < TINY_FREELISTS; ++i) {
if ((word)(fl[i]) >= HBLKSIZE) {
- return_single_freelist(fl[i], gfl+i);
+ return_single_freelist(fl[i], &gfl[i]);
}
/* Clear fl[i], since the thread structure may hang around. */
/* Do it in a way that is likely to trap if we access it. */
if (fl[0] == ERROR_FL) return;
# endif
if ((word)(fl[0]) >= HBLKSIZE) {
- return_single_freelist(fl[0], gfl+1);
+ return_single_freelist(fl[0], &gfl[1]);
}
}