Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gslice.h File Reference
#include <glib/gtypes.h>
#include <string.h>

Go to the source code of this file.

Macros

#define g_slice_new(type)   ((type*) g_slice_alloc (sizeof (type)))
 
#define g_slice_new0(type)   ((type*) g_slice_alloc0 (sizeof (type)))
 
#define g_slice_dup(type, mem)
 
#define g_slice_free(type, mem)
 
#define g_slice_free_chain(type, mem_chain, next)
 

Enumerations

enum  GSliceConfig {
  G_SLICE_CONFIG_ALWAYS_MALLOC = 1 , G_SLICE_CONFIG_BYPASS_MAGAZINES , G_SLICE_CONFIG_WORKING_SET_MSECS , G_SLICE_CONFIG_COLOR_INCREMENT ,
  G_SLICE_CONFIG_CHUNK_SIZES , G_SLICE_CONFIG_CONTENTION_COUNTER
}
 

Functions

G_BEGIN_DECLS GLIB_AVAILABLE_IN_ALL gpointer g_slice_alloc (gsize block_size) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1)
 
GLIB_AVAILABLE_IN_ALL gpointer g_slice_alloc0 (gsize block_size) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1)
 
GLIB_AVAILABLE_IN_ALL gpointer g_slice_copy (gsize block_size, gconstpointer mem_block) G_GNUC_ALLOC_SIZE(1)
 
GLIB_AVAILABLE_IN_ALL void g_slice_free1 (gsize block_size, gpointer mem_block)
 
GLIB_AVAILABLE_IN_ALL void g_slice_free_chain_with_offset (gsize block_size, gpointer mem_chain, gsize next_offset)
 
GLIB_DEPRECATED_IN_2_34 void g_slice_set_config (GSliceConfig ckey, gint64 value)
 
GLIB_DEPRECATED_IN_2_34 gint64 g_slice_get_config (GSliceConfig ckey)
 
GLIB_DEPRECATED_IN_2_34 gint64g_slice_get_config_state (GSliceConfig ckey, gint64 address, guint *n_values)
 

Macro Definition Documentation

◆ g_slice_dup

#define g_slice_dup ( type,
mem )
Value:
(1 ? (type*) g_slice_copy (sizeof (type), (mem)) \
: ((void) ((type*) 0 == (mem)), (type*) 0))
GLIB_AVAILABLE_IN_ALL gpointer g_slice_copy(gsize block_size, gconstpointer mem_block) G_GNUC_ALLOC_SIZE(1)

Definition at line 78 of file gslice.h.

78#define g_slice_dup(type, mem) \
79 (1 ? (type*) g_slice_copy (sizeof (type), (mem)) \
80 : ((void) ((type*) 0 == (mem)), (type*) 0))

◆ g_slice_free

#define g_slice_free ( type,
mem )
Value:
if (1) g_slice_free1 (sizeof (type), (mem)); \
else (void) ((type*) 0 == (mem)); \
#define G_STMT_END
Definition gmacros.h:997
#define G_STMT_START
Definition gmacros.h:989
GLIB_AVAILABLE_IN_ALL void g_slice_free1(gsize block_size, gpointer mem_block)

Definition at line 81 of file gslice.h.

81#define g_slice_free(type, mem) \
82G_STMT_START { \
83 if (1) g_slice_free1 (sizeof (type), (mem)); \
84 else (void) ((type*) 0 == (mem)); \
85} G_STMT_END

Referenced by g_object_notify_queue_free().

◆ g_slice_free_chain

#define g_slice_free_chain ( type,
mem_chain,
next )
Value:
if (1) g_slice_free_chain_with_offset (sizeof (type), \
(mem_chain), G_STRUCT_OFFSET (type, next)); \
else (void) ((type*) 0 == (mem_chain)); \
#define G_STRUCT_OFFSET(struct_type, member)
Definition gmacros.h:970
GLIB_AVAILABLE_IN_ALL void g_slice_free_chain_with_offset(gsize block_size, gpointer mem_chain, gsize next_offset)
#define next(ls)

Definition at line 86 of file gslice.h.

86#define g_slice_free_chain(type, mem_chain, next) \
87G_STMT_START { \
88 if (1) g_slice_free_chain_with_offset (sizeof (type), \
89 (mem_chain), G_STRUCT_OFFSET (type, next)); \
90 else (void) ((type*) 0 == (mem_chain)); \
91} G_STMT_END

◆ g_slice_new

#define g_slice_new ( type)    ((type*) g_slice_alloc (sizeof (type)))

Definition at line 48 of file gslice.h.

◆ g_slice_new0

#define g_slice_new0 ( type)    ((type*) g_slice_alloc0 (sizeof (type)))

Definition at line 62 of file gslice.h.

Referenced by g_object_notify_queue_freeze().

Enumeration Type Documentation

◆ GSliceConfig

Enumerator
G_SLICE_CONFIG_ALWAYS_MALLOC 
G_SLICE_CONFIG_BYPASS_MAGAZINES 
G_SLICE_CONFIG_WORKING_SET_MSECS 
G_SLICE_CONFIG_COLOR_INCREMENT 
G_SLICE_CONFIG_CHUNK_SIZES 
G_SLICE_CONFIG_CONTENTION_COUNTER 

Definition at line 94 of file gslice.h.

94 {
GSliceConfig
Definition gslice.h:94
@ G_SLICE_CONFIG_WORKING_SET_MSECS
Definition gslice.h:97
@ G_SLICE_CONFIG_BYPASS_MAGAZINES
Definition gslice.h:96
@ G_SLICE_CONFIG_CONTENTION_COUNTER
Definition gslice.h:100
@ G_SLICE_CONFIG_ALWAYS_MALLOC
Definition gslice.h:95
@ G_SLICE_CONFIG_COLOR_INCREMENT
Definition gslice.h:98
@ G_SLICE_CONFIG_CHUNK_SIZES
Definition gslice.h:99

Function Documentation

◆ g_slice_alloc()

G_BEGIN_DECLS GLIB_AVAILABLE_IN_ALL gpointer g_slice_alloc ( gsize block_size)

◆ g_slice_alloc0()

GLIB_AVAILABLE_IN_ALL gpointer g_slice_alloc0 ( gsize block_size)

◆ g_slice_copy()

GLIB_AVAILABLE_IN_ALL gpointer g_slice_copy ( gsize block_size,
gconstpointer mem_block )

◆ g_slice_free1()

GLIB_AVAILABLE_IN_ALL void g_slice_free1 ( gsize block_size,
gpointer mem_block )

◆ g_slice_free_chain_with_offset()

GLIB_AVAILABLE_IN_ALL void g_slice_free_chain_with_offset ( gsize block_size,
gpointer mem_chain,
gsize next_offset )

◆ g_slice_get_config()

GLIB_DEPRECATED_IN_2_34 gint64 g_slice_get_config ( GSliceConfig ckey)

◆ g_slice_get_config_state()

GLIB_DEPRECATED_IN_2_34 gint64 * g_slice_get_config_state ( GSliceConfig ckey,
gint64 address,
guint * n_values )

◆ g_slice_set_config()

GLIB_DEPRECATED_IN_2_34 void g_slice_set_config ( GSliceConfig ckey,
gint64 value )