mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-21 08:28:53 +02:00
glib/gmem.c (g_mem_is_system_malloc): Return !vtable_set.
docs/reference/glib/glib-sections.txt: Add g_mem_is_system_malloc.
This commit is contained in:
11
glib/gmem.c
11
glib/gmem.c
@@ -228,18 +228,19 @@ static gboolean vtable_set = FALSE;
|
||||
*
|
||||
* 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.
|
||||
* <function>malloc()</function> 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.
|
||||
*
|
||||
* A different allocator can be set using g_mem_set_vtable().
|
||||
*
|
||||
* Return value: if %TRUE, malloc() and g_malloc() can be mixed.
|
||||
* Return value: if %TRUE, <function>malloc()</function> and g_malloc() can be mixed.
|
||||
**/
|
||||
gboolean
|
||||
g_mem_is_system_malloc (void)
|
||||
{
|
||||
return vtable_set;
|
||||
return !vtable_set;
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user