diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2023-03-19 14:45:10 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2023-03-20 09:53:39 +0300 |
commit | 441698c68a90caa1670e9b46275c5db12668d171 (patch) | |
tree | e08b6d848f17b7c6c768dc5b09286497caa054da /include/private | |
parent | 63d838d6448555c6b241926fc4a1ba4a2e6448b7 (diff) | |
download | bdwgc-441698c68a90caa1670e9b46275c5db12668d171.tar.gz |
Fix description of client promise for IGNORE_OFF_PAGE allocated objects
(documentation)
The client should keep a pointer within the first heap block for such
an allocated object. Previously, it was mentioned in the documentation
and comments that such a pointer should be within the first 256 or 512
bytes.
* README.md (The C Interface to the Allocator): Fix the description
(comment) of GC_malloc_ignore_off_page (the client promises to keep
a pointer within the first hblk of the object instead of 256 or 512
bytes, or a page).
* docs/gcinterface.md (GC_MALLOC_IGNORE_OFF_PAGE): Likewise.
* gc.man (GC_malloc_atomic_ignore_off_page): Likewise.
* include/gc/gc.h (GC_malloc_ignore_off_page): Likewise.
* include/gc/gc_mark.h (GC_generic_malloc_ignore_off_page): Likewise.
* include/private/gc_priv.h (IGNORE_OFF_PAGE): Likewise.
* include/private/gc_priv.h [DBG_HDRS_ALL || GC_GCJ_SUPPORT
|| !GC_NO_FINALIZATION] (GC_generic_malloc_inner_ignore_off_page):
Likewise.
* malloc.c [DBG_HDRS_ALL || GC_GCJ_SUPPORT || !GC_NO_FINALIZATION]
(GC_generic_malloc_inner_ignore_off_page): Likewise.
* include/gc/gc_gcj.h (GC_gcj_malloc_ignore_off_page): Refine comment.
Diffstat (limited to 'include/private')
-rw-r--r-- | include/private/gc_priv.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/private/gc_priv.h b/include/private/gc_priv.h index ab61a614..d3857664 100644 --- a/include/private/gc_priv.h +++ b/include/private/gc_priv.h @@ -1132,7 +1132,7 @@ struct hblkhdr { /* list headers. Sometimes called regions. */ unsigned char hb_flags; # define IGNORE_OFF_PAGE 1 /* Ignore pointers that do not */ - /* point to the first page of */ + /* point to the first hblk of */ /* this object. */ # define WAS_UNMAPPED 2 /* This is a free block, which has */ /* been unmapped from the address */ @@ -2346,11 +2346,11 @@ GC_INNER void * GC_generic_malloc_inner(size_t lb, int k); #if defined(DBG_HDRS_ALL) || defined(GC_GCJ_SUPPORT) \ || !defined(GC_NO_FINALIZATION) GC_INNER void * GC_generic_malloc_inner_ignore_off_page(size_t lb, int k); - /* Allocate an object, where */ - /* the client guarantees that there */ - /* will always be a pointer to the */ - /* beginning of the object while the */ - /* object is live. */ + /* Allocate an object, where the client */ + /* guarantees that there will always be */ + /* a pointer to the beginning (i.e. */ + /* within the first hblk) of the object */ + /* while it is live. */ #endif GC_INNER GC_bool GC_collect_or_expand(word needed_blocks, |