(fix of commit
73d30d2)
This commit actually disables multiple objects allocation in
GC_generic_malloc_many (if MANUAL_VDB and the incremental mode is on);
the proper implementation would require GC_dirty call for each of the
allocated object (except for the last one).
* include/gc_inline.h (GC_FAST_MALLOC_GRANS): Call
GC_end_stubborn_change(my_fl) after GC_generic_malloc_many().
* mallocx.c [MANUAL_VDB] (GC_generic_malloc_many): Always fall back to
GC_generic_malloc (unless !GC_incremental).
GC_generic_malloc_many(((granules) == 0? GC_GRANULE_BYTES : \
GC_RAW_BYTES_FROM_INDEX(granules)), \
kind, my_fl); \
+ GC_end_stubborn_change(my_fl); \
my_entry = *my_fl; \
if (my_entry == 0) { \
result = (*GC_get_oom_fn())((granules)*GC_GRANULE_BYTES); \
DCL_LOCK_STATE;
GC_ASSERT(lb != 0 && (lb & (GRANULE_BYTES-1)) == 0);
- if (!SMALL_OBJ(lb)) {
+ if (!SMALL_OBJ(lb)
+# ifdef MANUAL_VDB
+ /* Currently a single object is allocated. */
+ /* TODO: GC_dirty should be called for each linked object (but */
+ /* the last one) to support multiple objects allocation. */
+ || GC_incremental
+# endif
+ ) {
op = GC_generic_malloc(lb, k);
if (EXPECT(0 != op, TRUE))
obj_link(op) = 0;