From: Ivan Maidanski Date: Mon, 10 Mar 2014 07:20:22 +0000 (+0400) Subject: Add alloc_size attribute to GC_generic_malloc X-Git-Tag: gc7_6_0~278 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=784d789a93ec0ce6ceec5ef860990418f452f087;p=gc Add alloc_size attribute to GC_generic_malloc * include/gc_mark.h (GC_generic_malloc, GC_generic_malloc_ignore_off_page): Add GC_ATTR_ALLOC_SIZE attribute. --- diff --git a/include/gc_mark.h b/include/gc_mark.h index 2f88f38a..56bee583 100644 --- a/include/gc_mark.h +++ b/include/gc_mark.h @@ -193,11 +193,13 @@ GC_API unsigned GC_CALL GC_new_proc_inner(GC_mark_proc); /* the descriptor is not correct. Even in the single-threaded case, */ /* we need to be sure that cleared objects on a free list don't */ /* cause a GC crash if they are accidentally traced. */ -GC_API GC_ATTR_MALLOC void * GC_CALL GC_generic_malloc(size_t /* lb */, - int /* k */); +GC_API GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(1) void * GC_CALL GC_generic_malloc( + size_t /* lb */, + int /* knd */); -GC_API GC_ATTR_MALLOC void * GC_CALL GC_generic_malloc_ignore_off_page( - size_t /* lb */, int /* k */); +GC_API GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(1) void * GC_CALL + GC_generic_malloc_ignore_off_page( + size_t /* lb */, int /* knd */); /* As above, but pointers to past the */ /* first page of the resulting object */ /* are ignored. */