From 441698c68a90caa1670e9b46275c5db12668d171 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Sun, 19 Mar 2023 14:45:10 +0300 Subject: 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. --- malloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'malloc.c') diff --git a/malloc.c b/malloc.c index 82c97e8a..6de6902f 100644 --- a/malloc.c +++ b/malloc.c @@ -207,7 +207,7 @@ 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) /* Allocate a composite object of size n bytes. The caller */ - /* guarantees that pointers past the first page are not relevant. */ + /* guarantees that pointers past the first hblk are not relevant. */ GC_INNER void * GC_generic_malloc_inner_ignore_off_page(size_t lb, int k) { size_t lb_adjusted; -- cgit v1.2.1