X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmetadata%2Fmempool-internals.h;h=3458232139c4d3a83dac251c024476ef30e19fd8;hb=9369ed6e23ee9e822a3aa2318ed55f083241fbcb;hp=b1ea15c1f22a611073b76af96b4ffc94dc614d2f;hpb=22448831bbcc3d170f80ae5e3cc02fccd39ff970;p=mono.git diff --git a/mono/metadata/mempool-internals.h b/mono/metadata/mempool-internals.h index b1ea15c1f22..3458232139c 100644 --- a/mono/metadata/mempool-internals.h +++ b/mono/metadata/mempool-internals.h @@ -1,3 +1,7 @@ +/** + * \file + */ + #ifndef _MONO_MEMPOOL_INTERNALS_H_ #define _MONO_MEMPOOL_INTERNALS_H_ @@ -57,6 +61,26 @@ g_slist_append_mempool (MonoMemPool *mp, GSList *list, gpointer data) return new_list; } +static inline GList* +g_list_append_mempool (MonoMemPool *mp, GList *list, gpointer data) +{ + GList *new_list; + + new_list = (GList *) mono_mempool_alloc0 (mp, sizeof (GList)); + new_list->data = data; + new_list->prev = g_list_last (list); + if (new_list->prev) + new_list->prev->next = new_list; + + return list ? list : new_list; +} + +char* +mono_mempool_strdup_vprintf (MonoMemPool *pool, const char *format, va_list args); + +char* +mono_mempool_strdup_printf (MonoMemPool *pool, const char *format, ...) MONO_ATTR_FORMAT_PRINTF(2,3);; + long mono_mempool_get_bytes_allocated (void);