summaryrefslogtreecommitdiff
path: root/gcc/ggc.h
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2012-07-13 17:51:34 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2012-07-13 17:51:34 +0000
commitbc6d217b74a81ee19e52aa91556784593ec78e1a (patch)
tree6394fa371a1a4a04fba45b009dbafb57a6ce01b3 /gcc/ggc.h
parente4fdf07d87628bc96fe65abbc473af4a6c384a48 (diff)
downloadgcc-bc6d217b74a81ee19e52aa91556784593ec78e1a.tar.gz
* ggc.h (ggc_internal_alloc_stat, ggc_alloc_typed_stat,
ggc_internal_cleared_alloc_stat, ggc_cleared_alloc_htab_ignore_args, ggc_cleared_alloc_ptr_array_two_args, ggc_splay_alloc): Add ATTRIBUTE_MALLOC. * alloc-pool.h (pool_alloc): Likewise. * final.c (final): Do not loop to find max_uid. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189470 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ggc.h')
-rw-r--r--gcc/ggc.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/gcc/ggc.h b/gcc/ggc.h
index 704237cc045..d90eec2c207 100644
--- a/gcc/ggc.h
+++ b/gcc/ggc.h
@@ -143,19 +143,22 @@ extern void gt_pch_save (FILE *f);
/* Allocation. */
/* The internal primitive. */
-extern void *ggc_internal_alloc_stat (size_t MEM_STAT_DECL);
+extern void *ggc_internal_alloc_stat (size_t MEM_STAT_DECL)
+ ATTRIBUTE_MALLOC;
extern size_t ggc_round_alloc_size (size_t requested_size);
#define ggc_internal_alloc(s) ggc_internal_alloc_stat (s MEM_STAT_INFO)
/* Allocate an object of the specified type and size. */
-extern void *ggc_alloc_typed_stat (enum gt_types_enum, size_t MEM_STAT_DECL);
+extern void *ggc_alloc_typed_stat (enum gt_types_enum, size_t MEM_STAT_DECL)
+ ATTRIBUTE_MALLOC;
#define ggc_alloc_typed(s, z) ggc_alloc_typed_stat (s, z MEM_STAT_INFO)
/* Allocates cleared memory. */
-extern void *ggc_internal_cleared_alloc_stat (size_t MEM_STAT_DECL);
+extern void *ggc_internal_cleared_alloc_stat (size_t MEM_STAT_DECL)
+ ATTRIBUTE_MALLOC;
/* Resize a block. */
extern void *ggc_realloc_stat (void *, size_t MEM_STAT_DECL);
@@ -202,9 +205,11 @@ ggc_alloc_atomic_stat (size_t s MEM_STAT_DECL)
#define ggc_alloc_cleared_atomic(S) \
(ggc_internal_cleared_alloc_stat ((S) MEM_STAT_INFO))
-extern void * ggc_cleared_alloc_htab_ignore_args (size_t, size_t);
+extern void *ggc_cleared_alloc_htab_ignore_args (size_t, size_t)
+ ATTRIBUTE_MALLOC;
-extern void * ggc_cleared_alloc_ptr_array_two_args (size_t, size_t);
+extern void *ggc_cleared_alloc_ptr_array_two_args (size_t, size_t)
+ ATTRIBUTE_MALLOC;
#define htab_create_ggc(SIZE, HASH, EQ, DEL) \
htab_create_typed_alloc (SIZE, HASH, EQ, DEL, \
@@ -216,7 +221,8 @@ extern void * ggc_cleared_alloc_ptr_array_two_args (size_t, size_t);
splay_tree_new_typed_alloc (COMPARE, NULL, NULL, &ALLOC_TREE, &ALLOC_NODE, \
&ggc_splay_dont_free, NULL)
-extern void *ggc_splay_alloc (enum gt_types_enum, int, void *);
+extern void *ggc_splay_alloc (enum gt_types_enum, int, void *)
+ ATTRIBUTE_MALLOC;
extern void ggc_splay_dont_free (void *, void *);
@@ -276,10 +282,12 @@ extern struct alloc_zone tree_id_zone;
/* Allocate an object into the specified allocation zone. */
extern void *ggc_internal_alloc_zone_stat (size_t,
- struct alloc_zone * MEM_STAT_DECL);
+ struct alloc_zone * MEM_STAT_DECL)
+ ATTRIBUTE_MALLOC;
extern void *ggc_internal_cleared_alloc_zone_stat (size_t,
- struct alloc_zone * MEM_STAT_DECL);
+ struct alloc_zone * MEM_STAT_DECL)
+ ATTRIBUTE_MALLOC;
static inline void *
ggc_internal_zone_alloc_stat (struct alloc_zone * z, size_t s MEM_STAT_DECL)