D-Bus 1.16.0
Data Structures | Typedefs | Functions | Variables
Memory allocation implementation details

internals of dbus_malloc() etc. More...

Data Structures

struct  ShutdownClosure
 This struct represents a function to be called on shutdown. More...
 

Typedefs

typedef struct ShutdownClosure ShutdownClosure
 Represents a function to be called on shutdown.
 

Functions

dbus_bool_t _dbus_register_shutdown_func (DBusShutdownFunction func, void *data)
 Register a cleanup function to be called exactly once the next time dbus_shutdown() is called.
 
dbus_bool_t _dbus_register_shutdown_func_unlocked (DBusShutdownFunction func, void *data)
 

Variables

int _dbus_current_generation = 1
 _dbus_current_generation is used to track each time that dbus_shutdown() is called, so we can reinit things after it's been called.
 

Detailed Description

internals of dbus_malloc() etc.

Implementation details related to allocating and releasing blocks of memory.

Typedef Documentation

◆ ShutdownClosure

Represents a function to be called on shutdown.

Definition at line 795 of file dbus-memory.c.

Function Documentation

◆ _dbus_register_shutdown_func()

dbus_bool_t _dbus_register_shutdown_func ( DBusShutdownFunction  func,
void *  data 
)

Register a cleanup function to be called exactly once the next time dbus_shutdown() is called.

Parameters
functhe function
datadata to pass to the function
Returns
FALSE on not enough memory

Definition at line 819 of file dbus-memory.c.

References _DBUS_LOCK, _DBUS_UNLOCK, and FALSE.

◆ _dbus_register_shutdown_func_unlocked()

dbus_bool_t _dbus_register_shutdown_func_unlocked ( DBusShutdownFunction  func,
void *  data 
)

Definition at line 833 of file dbus-memory.c.

Variable Documentation

◆ _dbus_current_generation

int _dbus_current_generation = 1

_dbus_current_generation is used to track each time that dbus_shutdown() is called, so we can reinit things after it's been called.

It is simply incremented each time we shut down.

Definition at line 790 of file dbus-memory.c.

Referenced by _dbus_connection_close_possibly_shared(), _dbus_connection_new_for_transport(), _dbus_connection_ref_unlocked(), _dbus_get_local_machine_uuid_encoded(), dbus_connection_close(), dbus_connection_ref(), dbus_connection_unref(), dbus_message_ref(), dbus_message_unref(), dbus_shutdown(), and dbus_threads_init().