diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2023-03-25 00:04:55 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2023-03-25 00:04:55 +0300 |
commit | 132eb0bc220b7c2e32d43e9e5c290b17a7e6f37a (patch) | |
tree | 9573042accd1de1d68d0132b429e85d3f445594d /include | |
parent | 55dbba223f8790e07ab83a1ced9a17fe99f9ed00 (diff) | |
download | bdwgc-132eb0bc220b7c2e32d43e9e5c290b17a7e6f37a.tar.gz |
Do not add extra byte to non-small uncollectible objects
Previously EXTRA_BYTES value was not added to the allocation size only
for small uncollectible objects.
* include/gc/gc.h (GC_all_interior_pointers): Refine comment (regarding
uncollectible objects).
* malloc.c (GC_generic_malloc_uncollectable): Define lb_orig local
variable; decrement lb before if(SMALL_OBJ(lb)); do not expect original
lb is zero; pass lb_orig (instead of lb) to GC_DBG_COLLECT_AT_MALLOC()
and to oom_fn().
Diffstat (limited to 'include')
-rw-r--r-- | include/gc/gc.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/gc/gc.h b/include/gc/gc.h index d4c8f2da..892642aa 100644 --- a/include/gc/gc.h +++ b/include/gc/gc.h @@ -201,7 +201,8 @@ GC_API GC_ATTR_DEPRECATED int GC_all_interior_pointers; /* Unless DONT_ADD_BYTE_AT_END is defined, this */ /* also affects whether sizes are increased by */ /* at least a byte to allow "off the end" */ - /* pointer recognition. Must be only 0 or 1. */ + /* pointer recognition (uncollectible objects */ + /* are the exception). Must be only 0 or 1. */ GC_API void GC_CALL GC_set_all_interior_pointers(int); GC_API int GC_CALL GC_get_all_interior_pointers(void); |