Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gallocator.h
Go to the documentation of this file.
1/*
2 * This library is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU Lesser General Public
4 * License as published by the Free Software Foundation; either
5 * version 2.1 of the License, or (at your option) any later version.
6 *
7 * This library is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 * Lesser General Public License for more details.
11 *
12 * You should have received a copy of the GNU Lesser General Public
13 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
14 */
15
16#ifndef __G_ALLOCATOR_H__
17#define __G_ALLOCATOR_H__
18
19#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
20#error "Only <glib.h> can be included directly."
21#endif
22
23#include <glib/gtypes.h>
24
26
27typedef struct _GAllocator GAllocator;
28typedef struct _GMemChunk GMemChunk;
29
30#define G_ALLOC_ONLY 1
31#define G_ALLOC_AND_FREE 2
32#define G_ALLOCATOR_LIST 1
33#define G_ALLOCATOR_SLIST 2
34#define G_ALLOCATOR_NODE 3
35
36#define g_chunk_new(type, chunk) ((type *) g_mem_chunk_alloc (chunk))
37#define g_chunk_new0(type, chunk) ((type *) g_mem_chunk_alloc0 (chunk))
38#define g_chunk_free(mem, mem_chunk) (g_mem_chunk_free (mem_chunk, mem))
39#define g_mem_chunk_create(type, x, y) (g_mem_chunk_new (NULL, sizeof (type), 0, 0))
40
41
44 gint atom_size,
45 gsize area_size,
46 gint type);
54void g_mem_chunk_free (GMemChunk *mem_chunk,
55 gpointer mem);
57void g_mem_chunk_clean (GMemChunk *mem_chunk);
59void g_mem_chunk_reset (GMemChunk *mem_chunk);
61void g_mem_chunk_print (GMemChunk *mem_chunk);
63void g_mem_chunk_info (void);
65void g_blow_chunks (void);
66
67
70 guint n_preallocs);
72void g_allocator_free (GAllocator *allocator);
85
87
88#endif /* __G_ALLOCATOR_H__ */
GLIB_DEPRECATED void g_mem_chunk_destroy(GMemChunk *mem_chunk)
GLIB_DEPRECATED void g_mem_chunk_clean(GMemChunk *mem_chunk)
GLIB_DEPRECATED void g_slist_push_allocator(GAllocator *allocator)
GLIB_DEPRECATED void g_slist_pop_allocator(void)
GLIB_DEPRECATED GMemChunk * g_mem_chunk_new(const gchar *name, gint atom_size, gsize area_size, gint type)
GLIB_DEPRECATED gpointer g_mem_chunk_alloc0(GMemChunk *mem_chunk)
GLIB_DEPRECATED void g_blow_chunks(void)
typedefG_BEGIN_DECLS struct _GAllocator GAllocator
Definition gallocator.h:27
GLIB_DEPRECATED void g_mem_chunk_free(GMemChunk *mem_chunk, gpointer mem)
GLIB_DEPRECATED void g_list_push_allocator(GAllocator *allocator)
GLIB_DEPRECATED void g_node_push_allocator(GAllocator *allocator)
GLIB_DEPRECATED void g_mem_chunk_print(GMemChunk *mem_chunk)
struct _GMemChunk GMemChunk
Definition gallocator.h:28
GLIB_DEPRECATED gpointer g_mem_chunk_alloc(GMemChunk *mem_chunk)
GLIB_DEPRECATED void g_node_pop_allocator(void)
GLIB_DEPRECATED void g_allocator_free(GAllocator *allocator)
GLIB_DEPRECATED GAllocator * g_allocator_new(const gchar *name, guint n_preallocs)
GLIB_DEPRECATED void g_mem_chunk_reset(GMemChunk *mem_chunk)
GLIB_DEPRECATED void g_list_pop_allocator(void)
GLIB_DEPRECATED void g_mem_chunk_info(void)
#define GLIB_DEPRECATED
unsigned long gsize
Definition glibconfig.h:83
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
G_BEGIN_DECLS typedef char gchar
Definition gtypes.h:52
void * gpointer
Definition gtypes.h:109
int gint
Definition gtypes.h:55
unsigned int guint
Definition gtypes.h:61
const char * name
Definition lsqlite3.c:2154