Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-06 08:41:16

0001 /*
0002  * This library is free software; you can redistribute it and/or
0003  * modify it under the terms of the GNU Lesser General Public
0004  * License as published by the Free Software Foundation; either
0005  * version 2.1 of the License, or (at your option) any later version.
0006  *
0007  * This library is distributed in the hope that it will be useful,
0008  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0009  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0010  * Lesser General Public License for more details.
0011  *
0012  * You should have received a copy of the GNU Lesser General Public
0013  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
0014  */
0015 
0016 #ifndef __G_ALLOCATOR_H__
0017 #define __G_ALLOCATOR_H__
0018 
0019 #if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
0020 #error "Only <glib.h> can be included directly."
0021 #endif
0022 
0023 #include <glib/gtypes.h>
0024 
0025 G_BEGIN_DECLS
0026 
0027 typedef struct _GAllocator GAllocator;
0028 typedef struct _GMemChunk  GMemChunk;
0029 
0030 #define G_ALLOC_ONLY                    1
0031 #define G_ALLOC_AND_FREE                2
0032 #define G_ALLOCATOR_LIST                1
0033 #define G_ALLOCATOR_SLIST               2
0034 #define G_ALLOCATOR_NODE                3
0035 
0036 #define g_chunk_new(type, chunk)        ((type *) g_mem_chunk_alloc (chunk))
0037 #define g_chunk_new0(type, chunk)       ((type *) g_mem_chunk_alloc0 (chunk))
0038 #define g_chunk_free(mem, mem_chunk)    (g_mem_chunk_free (mem_chunk, mem))
0039 #define g_mem_chunk_create(type, x, y)  (g_mem_chunk_new (NULL, sizeof (type), 0, 0))
0040 
0041 
0042 GLIB_DEPRECATED
0043 GMemChunk *     g_mem_chunk_new         (const gchar  *name,
0044                                          gint          atom_size,
0045                                          gsize         area_size,
0046                                          gint          type);
0047 GLIB_DEPRECATED
0048 void            g_mem_chunk_destroy     (GMemChunk    *mem_chunk);
0049 GLIB_DEPRECATED
0050 gpointer        g_mem_chunk_alloc       (GMemChunk    *mem_chunk);
0051 GLIB_DEPRECATED
0052 gpointer        g_mem_chunk_alloc0      (GMemChunk    *mem_chunk);
0053 GLIB_DEPRECATED
0054 void            g_mem_chunk_free        (GMemChunk    *mem_chunk,
0055                                          gpointer      mem);
0056 GLIB_DEPRECATED
0057 void            g_mem_chunk_clean       (GMemChunk    *mem_chunk);
0058 GLIB_DEPRECATED
0059 void            g_mem_chunk_reset       (GMemChunk    *mem_chunk);
0060 GLIB_DEPRECATED
0061 void            g_mem_chunk_print       (GMemChunk    *mem_chunk);
0062 GLIB_DEPRECATED
0063 void            g_mem_chunk_info        (void);
0064 GLIB_DEPRECATED
0065 void            g_blow_chunks           (void);
0066 
0067 
0068 GLIB_DEPRECATED
0069 GAllocator *    g_allocator_new         (const gchar  *name,
0070                                          guint         n_preallocs);
0071 GLIB_DEPRECATED
0072 void            g_allocator_free        (GAllocator   *allocator);
0073 GLIB_DEPRECATED
0074 void            g_list_push_allocator   (GAllocator   *allocator);
0075 GLIB_DEPRECATED
0076 void            g_list_pop_allocator    (void);
0077 GLIB_DEPRECATED
0078 void            g_slist_push_allocator  (GAllocator   *allocator);
0079 GLIB_DEPRECATED
0080 void            g_slist_pop_allocator   (void);
0081 GLIB_DEPRECATED
0082 void            g_node_push_allocator   (GAllocator   *allocator);
0083 GLIB_DEPRECATED
0084 void            g_node_pop_allocator    (void);
0085 
0086 G_END_DECLS
0087 
0088 #endif /* __G_ALLOCATOR_H__ */