X_MEM_STAT_INFO)
{
    return ggc_internal_alloc (s PASS_MEM_STAT);
}

/* Call destructor and free the garbage collected memory.  */

template <typename T>
inline void
ggc_delete (T *ptr)
{
  ptr->~T ();
  ggc_free (ptr);
}

/* Allocate a gc-able string, and fill it with LENGTH bytes from CONTENTS.
   If LENGTH is -1, then CONTENTS is assumed to be a
   null-terminated string and the memory sized accordingly.  */
extern const char *ggc_alloc_string (const char *contents, int length
                                     CXX_MEM_STAT_INFO);

/* Make a copy of S, in GC-able memory.  */
#define ggc_strdup(S) ggc_alloc_string ((S), -1 MEM_STAT_INFO)

/* Invoke the collector.  Garbage collection occurs only when this
   function is called, not during allocations.  */
enum ggc_collect {
  GGC_COLLECT_HEURISTIC,
  GGC_COLLECT_FORCE
};
extern void ggc_collect (enum ggc_collect mode = GGC_COLLECT_HEURISTIC);

/* Return unused memory pages to the system.  */
extern void ggc_trim (void);

/* Assume that all GGC memory is reachable and grow the limits for next collection. */
extern void ggc_grow (void);

/* Register an additional root table.  This can be useful for some
   plugins.  Does nothing if the passed pointer is NULL. */
extern void ggc_register_root_tab (const struct ggc_root_tab *);

/* Read objects previously saved with gt_pch_save from F.  */
extern void gt_pch_restore (FILE *f);
