diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2023-01-31 22:54:45 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2023-01-31 23:02:42 +0300 |
commit | 31fa843270a83e5e93c8dee16a3654eb93a98833 (patch) | |
tree | 67f17e4e375f0d2b2c1ee2dc39b86f207c7fe6de /mallocx.c | |
parent | f6befb64d1d366f18f6d72569e179bfe7d36f4c8 (diff) | |
download | bdwgc-31fa843270a83e5e93c8dee16a3654eb93a98833.tar.gz |
Better document missing debugging version for aligned allocation routines
* dbg_mlc.c (GC_debug_free): Add TODO item to suppress a GC warning.
* include/gc/leak_detector.h (aligned_alloc): Add comment that the
debugging version is missing.
* mallocx.c (GC_memalign): Add TODO item about the missing debugging
version.
Diffstat (limited to 'mallocx.c')
-rw-r--r-- | mallocx.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -491,7 +491,15 @@ GC_API GC_ATTR_MALLOC void * GC_CALL GC_malloc_many(size_t lb) return result; } -/* Debug version is tricky and currently missing. */ +/* TODO: The debugging version of GC_memalign and friends is tricky */ +/* and currently missing. There are 2 major difficulties: */ +/* - GC_base() should always point to the beginning of the allocated */ +/* block (thus, for small objects allocation we should probably */ +/* iterate over the list of free objects to find the one with the */ +/* suitable alignment); */ +/* - store_debug_info() should return the pointer of the object with */ +/* the requested alignment (unlike the object header). */ + GC_API GC_ATTR_MALLOC void * GC_CALL GC_memalign(size_t align, size_t lb) { size_t offset; |