libfossil
fsl_lib_configurable_t Struct Reference

This type, accessible to clients via the fsl_lib_configurable global, contains configuration-related data for the library which can be swapped out by clients. More...

#include "fossil-core.h"

Data Fields

fsl_allocator allocator
 Library-wide allocator. More...
 

Detailed Description

This type, accessible to clients via the fsl_lib_configurable global, contains configuration-related data for the library which can be swapped out by clients.

Definition at line 478 of file fossil-core.h.

Field Documentation

fsl_allocator fsl_lib_configurable_t::allocator

Library-wide allocator.

It may be replaced by the client IFF it is replaced before the library allocates any memory. The default implementation uses the C-standard de/re/allocators. Modifying this member while any memory allocated through it is still "live" leads to undefined results. There is an exception: a "read-only" middleman proxy which does not change how the memory is allocated or intepreted can safely be swapped in or out at any time provided the underlying allocator stays the same and the client can ensure that there are no thread-related race conditions. e.g. it is legal to swap this out with a proxy which logs allocation requests and then forwards the call on to the original implementation, and it is legal to do so at essentially any time. The important thing this that all of the library-allocated memory goes through a single underlying (de)allocator for the lifetime of the application.

Definition at line 497 of file fossil-core.h.


The documentation for this struct was generated from the following file: