mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-12 02:35:28 +01:00
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:
parent
58f3fdd748
commit
5277fd1e24
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
18
glib/gmem.c
18
glib/gmem.c
@ -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;
|
||||
}
|
||||
|
@ -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()
|
||||
*/
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user