Rename g_mem_vtable_is_set() to g_mem_is_system_malloc().

Thu Sep 20 20:33:45 2001  Owen Taylor  <otaylor@redhat.com>

	* Rename g_mem_vtable_is_set() to g_mem_is_system_malloc().
This commit is contained in:
Owen Taylor 2001-09-21 00:34:12 +00:00 committed by Owen Taylor
parent 58f3fdd748
commit 5277fd1e24
11 changed files with 44 additions and 10 deletions

View File

@ -1,3 +1,7 @@
Thu Sep 20 20:33:45 2001 Owen Taylor <otaylor@redhat.com>
* Rename g_mem_vtable_is_set() to g_mem_is_system_malloc().
2001-09-20 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_path_is_absolute): (Win32:) Accept also forward

View File

@ -1,3 +1,7 @@
Thu Sep 20 20:33:45 2001 Owen Taylor <otaylor@redhat.com>
* Rename g_mem_vtable_is_set() to g_mem_is_system_malloc().
2001-09-20 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_path_is_absolute): (Win32:) Accept also forward

View File

@ -1,3 +1,7 @@
Thu Sep 20 20:33:45 2001 Owen Taylor <otaylor@redhat.com>
* Rename g_mem_vtable_is_set() to g_mem_is_system_malloc().
2001-09-20 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_path_is_absolute): (Win32:) Accept also forward

View File

@ -1,3 +1,7 @@
Thu Sep 20 20:33:45 2001 Owen Taylor <otaylor@redhat.com>
* Rename g_mem_vtable_is_set() to g_mem_is_system_malloc().
2001-09-20 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_path_is_absolute): (Win32:) Accept also forward

View File

@ -1,3 +1,7 @@
Thu Sep 20 20:33:45 2001 Owen Taylor <otaylor@redhat.com>
* Rename g_mem_vtable_is_set() to g_mem_is_system_malloc().
2001-09-20 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_path_is_absolute): (Win32:) Accept also forward

View File

@ -1,3 +1,7 @@
Thu Sep 20 20:33:45 2001 Owen Taylor <otaylor@redhat.com>
* Rename g_mem_vtable_is_set() to g_mem_is_system_malloc().
2001-09-20 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_path_is_absolute): (Win32:) Accept also forward

View File

@ -1,3 +1,7 @@
Thu Sep 20 20:33:45 2001 Owen Taylor <otaylor@redhat.com>
* Rename g_mem_vtable_is_set() to g_mem_is_system_malloc().
2001-09-20 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_path_is_absolute): (Win32:) Accept also forward

View File

@ -1,3 +1,7 @@
Thu Sep 20 20:33:45 2001 Owen Taylor <otaylor@redhat.com>
* Rename g_mem_vtable_is_set() to g_mem_is_system_malloc().
2001-09-20 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_path_is_absolute): (Win32:) Accept also forward

View File

@ -224,18 +224,20 @@ fallback_calloc (gsize n_blocks,
static gboolean vtable_set = FALSE;
/**
* g_mem_vtable_is_set:
* g_mem_is_system_malloc
*
* Checks whether a custom vtable as been set by g_mem_set_vtable.
* If a custom vtable has not been set, memory allocated with
* free() can be used interchangeable with memory allocated using
* g_free(). This function is useful for avoiding an extra copy
* Checks whether the allocator used by g_malloc() is the system's
* malloc implementation. If it returns %TRUE memory allocated with
* malloc() can be used interchangeable with memory allocated using
* g_malloc(). This function is useful for avoiding an extra copy
* of allocated memory returned by a non-GLib-based API.
*
* Return value: if %TRUE, a custom vtable has been set.
*
* A different allocator can be set using g_mem_set_vtable().
*
* Return value: if %TRUE, malloc() and g_malloc() can be mixed.
**/
gboolean
g_mem_vtable_is_set (void)
g_mem_is_system_malloc (void)
{
return vtable_set;
}

View File

@ -83,7 +83,7 @@ struct _GMemVTable
gsize n_bytes);
};
void g_mem_set_vtable (GMemVTable *vtable);
gboolean g_mem_vtable_is_set (void);
gboolean g_mem_is_system_malloc (void);
/* Memory profiler and checker, has to be enabled via g_mem_set_vtable()
*/

View File

@ -186,7 +186,7 @@ g_strdup_vprintf (const gchar *format,
gchar *buffer;
#ifdef HAVE_VASPRINTF
vasprintf (&buffer, format, args1);
if (g_mem_vtable_is_set ())
if (g_mem_is_system_malloc ())
{
gchar *buffer1 = g_strdup (buffer);
free (buffer);