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:
Matthias Clasen 2001-09-26 22:00:17 +00:00
parent 18190575f8
commit c7896e13d3
11 changed files with 44 additions and 7 deletions

View File

@ -1,3 +1,7 @@
2001-09-26 Matthias Clasen <matthiasc@poet.de>
* gmem.c (g_mem_is_system_malloc): Return !vtable_set.
2001-09-26 Tor Lillqvist <tml@iki.fi> 2001-09-26 Tor Lillqvist <tml@iki.fi>
* configure.in: Retract my change earlier today. Don't preset * configure.in: Retract my change earlier today. Don't preset

View File

@ -1,3 +1,7 @@
2001-09-26 Matthias Clasen <matthiasc@poet.de>
* gmem.c (g_mem_is_system_malloc): Return !vtable_set.
2001-09-26 Tor Lillqvist <tml@iki.fi> 2001-09-26 Tor Lillqvist <tml@iki.fi>
* configure.in: Retract my change earlier today. Don't preset * configure.in: Retract my change earlier today. Don't preset

View File

@ -1,3 +1,7 @@
2001-09-26 Matthias Clasen <matthiasc@poet.de>
* gmem.c (g_mem_is_system_malloc): Return !vtable_set.
2001-09-26 Tor Lillqvist <tml@iki.fi> 2001-09-26 Tor Lillqvist <tml@iki.fi>
* configure.in: Retract my change earlier today. Don't preset * configure.in: Retract my change earlier today. Don't preset

View File

@ -1,3 +1,7 @@
2001-09-26 Matthias Clasen <matthiasc@poet.de>
* gmem.c (g_mem_is_system_malloc): Return !vtable_set.
2001-09-26 Tor Lillqvist <tml@iki.fi> 2001-09-26 Tor Lillqvist <tml@iki.fi>
* configure.in: Retract my change earlier today. Don't preset * configure.in: Retract my change earlier today. Don't preset

View File

@ -1,3 +1,7 @@
2001-09-26 Matthias Clasen <matthiasc@poet.de>
* gmem.c (g_mem_is_system_malloc): Return !vtable_set.
2001-09-26 Tor Lillqvist <tml@iki.fi> 2001-09-26 Tor Lillqvist <tml@iki.fi>
* configure.in: Retract my change earlier today. Don't preset * configure.in: Retract my change earlier today. Don't preset

View File

@ -1,3 +1,7 @@
2001-09-26 Matthias Clasen <matthiasc@poet.de>
* gmem.c (g_mem_is_system_malloc): Return !vtable_set.
2001-09-26 Tor Lillqvist <tml@iki.fi> 2001-09-26 Tor Lillqvist <tml@iki.fi>
* configure.in: Retract my change earlier today. Don't preset * configure.in: Retract my change earlier today. Don't preset

View File

@ -1,3 +1,7 @@
2001-09-26 Matthias Clasen <matthiasc@poet.de>
* gmem.c (g_mem_is_system_malloc): Return !vtable_set.
2001-09-26 Tor Lillqvist <tml@iki.fi> 2001-09-26 Tor Lillqvist <tml@iki.fi>
* configure.in: Retract my change earlier today. Don't preset * configure.in: Retract my change earlier today. Don't preset

View File

@ -1,3 +1,7 @@
2001-09-26 Matthias Clasen <matthiasc@poet.de>
* gmem.c (g_mem_is_system_malloc): Return !vtable_set.
2001-09-26 Tor Lillqvist <tml@iki.fi> 2001-09-26 Tor Lillqvist <tml@iki.fi>
* configure.in: Retract my change earlier today. Don't preset * configure.in: Retract my change earlier today. Don't preset

View File

@ -1,6 +1,10 @@
2001-09-26 Matthias Clasen <matthiasc@poet.de>
* glib/glib-sections.txt: Add g_mem_is_system_malloc.
2001-09-25 Matthias Clasen <matthiasc@poet.de> 2001-09-25 Matthias Clasen <matthiasc@poet.de>
* glib/glib-section.txt: Add a missing SECTION * glib/glib-sections.txt: Add a missing SECTION
endtag. (#61126) endtag. (#61126)
2001-09-17 Darin Adler <darin@bentspoon.com> 2001-09-17 Darin Adler <darin@bentspoon.com>

View File

@ -704,11 +704,11 @@ g_memdup
<SUBSECTION> <SUBSECTION>
GMemVTable GMemVTable
g_mem_set_vtable g_mem_set_vtable
g_mem_is_system_malloc
<SUBSECTION> <SUBSECTION>
glib_mem_profiler_table glib_mem_profiler_table
g_mem_profile g_mem_profile
</SECTION> </SECTION>
<SECTION> <SECTION>

View File

@ -228,18 +228,19 @@ static gboolean vtable_set = FALSE;
* *
* Checks whether the allocator used by g_malloc() is the system's * Checks whether the allocator used by g_malloc() is the system's
* malloc implementation. If it returns %TRUE memory allocated with * malloc implementation. If it returns %TRUE memory allocated with
* malloc() can be used interchangeable with memory allocated using * <function>malloc()</function> can be used interchangeable with
* g_malloc(). This function is useful for avoiding an extra copy * memory allocated using g_malloc(). This function is useful for
* of allocated memory returned by a non-GLib-based API. * 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(). * 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 gboolean
g_mem_is_system_malloc (void) g_mem_is_system_malloc (void)
{ {
return vtable_set; return !vtable_set;
} }
void void