koliseo 0.5.4
|
#include <stdio.h>
#include <stdint.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdarg.h>
#include <assert.h>
#include <string.h>
#include <time.h>
#include <stdbool.h>
Go to the source code of this file.
Data Structures | |
struct | KLS_Err_Handlers |
Defines the handlers used for errors in push calls. More... | |
struct | KLS_Hooks |
struct | KLS_Conf |
Defines flags for Koliseo. More... | |
struct | KLS_Stats |
Defines a stat struct for Koliseo. More... | |
struct | Koliseo |
Represents the initialised arena allocator struct. More... | |
struct | Koliseo_Temp |
Represents a savestate for a Koliseo. More... |
Macros | |
#define | KOLISEO_H_ |
#define | _POSIX_C_SOURCE 200809L |
#define | KLS_MAJOR 0 |
Represents current major release. | |
#define | KLS_MINOR 5 |
Represents current minor release. | |
#define | KLS_PATCH 4 |
Represents current patch release. | |
#define | STRINGIFY_2(x) |
#define | STRINGIFY(x) |
#define | KLS_MAX(a, b) |
#define | KLS_DEFAULT_SIZE (16*1024) |
Represents a simple default size for demo purposes. | |
#define | KLS_DEFAULT_ALIGNMENT (2*sizeof(void *)) |
Represents a default alignment value. | |
#define | KLS_DEFAULT_ERR_HANDLERS (KLS_Err_Handlers) { .OOM_handler = &KLS_OOM_default_handler__, .PTRDIFF_MAX_handler = &KLS_PTRDIFF_MAX_default_handler__, .ZEROCOUNT_handler = &KLS_ZEROCOUNT_default_handler__, } |
#define | KLS_DEFAULT_HOOKS &(KLS_Hooks){0} |
Defines default hooks that are loaded on kls_new() variants lacking explicit set of KLS_Hooks. | |
#define | KLS_DEFAULT_EXTENSION_DATA NULL |
Defines default hooks that are loaded on kls_new() variants lacking explicit set of KLS_Hooks. | |
#define | KLS_Conf_Fmt "KLS_Conf { collect_stats: %i, verbose_lvl: %i, log_filepath: \"%s\", log_fp: %p, block_while_has_temp: %i, allow_zerocount_push: %i }" |
Defines a format string for KLS_Conf. | |
#define | KLS_Conf_Arg(conf) |
Defines a format macro for KLS_Conf args. | |
#define | KLS_Stats_Fmt "KLS_Stats { tot_pushes: %i, tot_pops: %i, tot_temp_pushes: %i, tot_temp_pops: %i, tot_hiccups: %i, worst_push_time: %.7f }" |
Defines a format string for KLS_Stats. | |
#define | KLS_Stats_Arg(stats) |
Defines a format macro for KLS_Stats args. | |
#define | KLS_MAX_EXTENSIONS 1 |
Defines how many extensions can be handled at once. | |
#define | KLS_DEFAULT_EXTENSIONS_LEN 0 |
Defines how many extensions are loaded on kls_new() variants lacking explicit set of KLS_Hooks. | |
#define | KLSFmt "KLS {begin: %p, curr: %p, size: %li, offset: %li, has_temp: %i}" |
Defines a format string for Koliseo. | |
#define | KLS_Arg(kls) |
Defines a format macro for Koliseo args. | |
#define | KLS_DEFAULT_ALLOCF malloc |
Defines the default allocation function. | |
#define | KLS_DEFAULT_FREEF free |
Defines the default free function. | |
#define | kls__check_available(kls, size, align, count) |
Macro to return NULL on errors from kls__check_available_failable. | |
#define | KLS_PUSH_ARR(kls, type, count) |
Macro used to request memory for an array of type values from a Koliseo. | |
#define | KLS_PUSH_STR(kls, cstr) |
Macro to request memory for a C string from a Koliseo. | |
#define | KLS_PUSH_ARR_NAMED(kls, type, count, name, desc) |
Macro used to request memory for an array of type values from a Koliseo, and assign a name and a description to the region item. | |
#define | KLS_PUSH_STR_NAMED(kls, cstr, name, desc) |
Macro to request memory for a C string from a Koliseo, and assign a name and a description to the region item. | |
#define | KLS_PUSH_ARR_TYPED(kls, type, count, region_type, name, desc) |
Macro used to request memory for an array of type values from a Koliseo, and assign a type, a name and a description to the region item. | |
#define | KLS_PUSH_STR_TYPED(kls, cstr, region_type, name, desc) |
Macro to request memory for a C string from a Koliseo, and assign a type, a name and a description to the region item. | |
#define | KLS_PUSH(kls, type) |
Macro used to request memory from a Koliseo. | |
#define | KLS_PUSH_NAMED(kls, type, name, desc) |
Macro used to request memory from a Koliseo, and assign a name and a description to the region item. | |
#define | KLS_PUSH_EX(kls, type, name) |
Macro used to request memory from a Koliseo, and assign a name to the region item. | |
#define | KLS_PUSH_TYPED(kls, type, region_type, name, desc) |
Macro used to request memory from a Koliseo, and assign a a type, a name and a description to the region item. | |
#define | KLS_PUSH_TYPED_EX(kls, type, region_type, name) |
Macro used to request memory from a Koliseo, and assign a type and a name to the region item. | |
#define | KLS_PUSH_ARR_T(kls_temp, type, count) |
Macro used to request memory for an array of type values from a Koliseo_Temp. | |
#define | KLS_PUSH_STR_T(kls_temp, cstr) |
Macro to request memory for a C string from a Koliseo_Temp. | |
#define | KLS_PUSH_ARR_T_NAMED(kls_temp, type, count, name, desc) |
Macro used to request memory for an array of type values from a Koliseo_Temp, and assign a name and a description to the region item. | |
#define | KLS_PUSH_STR_T_NAMED(kls_temp, cstr, name, desc) |
Macro to request memory for a C string from a Koliseo_Temp, and assign a name and a description to the region item. | |
#define | KLS_PUSH_ARR_T_TYPED(kls_temp, type, count, region_type, name, desc) |
Macro used to request memory for an array of type values from a Koliseo_Temp, and assign a type, a name and a description to the region item. | |
#define | KLS_PUSH_STR_T_TYPED(kls_temp, cstr, region_type, name, desc) |
Macro to request memory for a C string from a Koliseo_Temp, and assign a type, a name and a description to the region item. | |
#define | KLS_PUSH_T(kls_temp, type) |
Macro used to request memory from a Koliseo_Temp. | |
#define | KLS_PUSH_T_NAMED(kls_temp, type, name, desc) |
Macro used to request memory from a Koliseo_Temp, and assign a name and a description to the region item. | |
#define | KLS_PUSH_T_EX(kls_temp, type, name) |
Macro used to request memory from a Koliseo_Temp, and assign a name to the region item. | |
#define | KLS_PUSH_T_TYPED(kls_temp, type, region_type, name, desc) |
Macro used to request memory from a Koliseo_Temp, and assign a type, a name and a description to the region item. | |
#define | KLS_PUSH_T_TYPED_EX(kls_temp, type, region_type, name) |
Macro used to request memory from a Koliseo_Temp, and assign a type and a name to the region item. | |
#define | KLS_POP_ARR(kls, type, count) |
Macro used to "remove" memory as an array from a Koliseo. | |
#define | KLS_POP_STR(kls, cstr) |
Macro to "remove" the memory for a C string from a Koliseo. | |
#define | KLS_POP(kls, type) |
Macro used to "remove" memory from a Koliseo. | |
#define | KLS_POP_ARR_T(kls_temp, type, count) |
Macro used to "remove" memory as an array from a Koliseo_Temp. | |
#define | KLS_POP_STR_T(kls_temp, cstr) |
Macro to "remove" the memory for a C string from a Koliseo_Temp. | |
#define | KLS_POP_T(kls_temp, type) |
Macro used to "remove" memory from a Koliseo_Temp. | |
#define | KLS__STRCPY(dest, source) |
Macro to copy a C string from a source buffer to a destination buffer. | |
#define | KLS_STRDUP(kls, source) |
#define | KLS_STRDUP_T(t_kls, source) |
Typedefs | |
typedef void * | kls_alloc_func(size_t) |
Used to select an allocation function for the arena's backing memory. | |
typedef void | kls_free_func(void *) |
Used to select a free function for the arena's backing memory. | |
typedef void | KLS_OOM_Handler(struct Koliseo *kls, ptrdiff_t available, ptrdiff_t padding, ptrdiff_t size, ptrdiff_t count) |
Used to pass an error handler for Out-Of-Memory error. | |
typedef void | KLS_PTRDIFF_MAX_Handler(struct Koliseo *kls, ptrdiff_t size, ptrdiff_t count) |
Used to pass an error handler for count > (PTRDIFF_MAX / size) error. | |
typedef void | KLS_ZEROCOUNT_Handler(struct Koliseo *kls, ptrdiff_t available, ptrdiff_t padding, ptrdiff_t size) |
Used to pass an error handler for zero-count push call error. | |
typedef struct KLS_Err_Handlers | KLS_Err_Handlers |
Defines the handlers used for errors in push calls. | |
typedef void | KLS_hook_on_new(struct Koliseo *kls) |
Used to pass an extension handler for kls_new_alloc(). | |
typedef void | KLS_hook_on_free(struct Koliseo *kls) |
Used to pass an extension handler for kls_free(). | |
typedef void | KLS_hook_on_push(struct Koliseo *kls, ptrdiff_t padding, const char *caller, void *user) |
Used to pass an extension handler for kls_push(). | |
typedef void | KLS_hook_on_temp_start(struct Koliseo_Temp *t_kls) |
Used to pass an extension handler for kls_temp_start(). | |
typedef void | KLS_hook_on_temp_free(struct Koliseo_Temp *t_kls) |
Used to pass an extension handler for kls_temp_end(). | |
typedef void | KLS_hook_on_temp_push(struct Koliseo_Temp *t_kls, ptrdiff_t padding, const char *caller, void *user) |
Used to pass an extension handler for kls_temp_push(). | |
typedef struct KLS_Hooks | KLS_Hooks |
typedef struct KLS_Conf | KLS_Conf |
Defines flags for Koliseo. | |
typedef struct KLS_Stats | KLS_Stats |
Defines a stat struct for Koliseo. | |
typedef struct Koliseo | Koliseo |
Represents the initialised arena allocator struct. | |
typedef struct Koliseo_Temp | Koliseo_Temp |
Represents a savestate for a Koliseo. |
Functions | |
const char * | string_koliseo_version (void) |
Returns current koliseo version as a string. | |
int | int_koliseo_version (void) |
Returns current koliseo version as an integer. | |
void | KLS_OOM_default_handler__ (struct Koliseo *kls, ptrdiff_t available, ptrdiff_t padding, ptrdiff_t size, ptrdiff_t count) |
Used by default when no handler is passed. | |
void | KLS_PTRDIFF_MAX_default_handler__ (struct Koliseo *kls, ptrdiff_t size, ptrdiff_t count) |
Used by default when no handler is passed. | |
void | KLS_ZEROCOUNT_default_handler__ (struct Koliseo *kls, ptrdiff_t available, ptrdiff_t padding, ptrdiff_t size) |
Used by default when no handler is passed. | |
KLS_Conf | kls_conf_init_handled (int collect_stats, int verbose_lvl, int block_while_has_temp, int allow_zerocount_push, int growable, FILE *log_fp, const char *log_filepath, KLS_Err_Handlers err_handlers) |
Used to prepare a KLS_Conf without caring about KOLISEO_HAS_REGIONS. | |
KLS_Conf | kls_conf_init (int collect_stats, int verbose_lvl, int block_while_has_temp, int allow_zerocount_push, int growable, FILE *log_fp, const char *log_filepath) |
Used to prepare a KLS_Conf without caring about KOLISEO_HAS_REGIONS. | |
void | kls_dbg_features (void) |
Prints enabled Koliseo features to stderr. | |
void | kls_log (Koliseo *kls, const char *tag, const char *format,...) |
Logs a message to the log_fp FILE field of the passed Koliseo pointer, if its conf.kls_verbose_lvl is >0. | |
ptrdiff_t | kls_get_pos (const Koliseo *kls) |
Returns the current offset (position of pointer bumper) for the passed Koliseo. | |
Koliseo * | kls_new_alloc_ext (ptrdiff_t size, kls_alloc_func alloc_func, kls_free_func free_func, KLS_Hooks *ext_handlers, void **user, size_t ext_len) |
Takes a ptrdiff_t size and a function pointer to the allocation function. | |
Koliseo * | kls_new_alloc (ptrdiff_t size, kls_alloc_func alloc_func, kls_free_func free_func) |
Takes a ptrdiff_t size and a function pointer to the allocation function. | |
Koliseo * | kls_new (ptrdiff_t size) |
Takes a ptrdiff_t size. | |
Koliseo * | kls_new_conf_alloc_ext (ptrdiff_t size, KLS_Conf conf, kls_alloc_func alloc_func, kls_free_func free_func, KLS_Hooks *ext_handlers, void **user, size_t ext_len) |
Takes a ptrdiff_t size, a KLS_Conf to configure the new Koliseo, an allocation function pointer and a free function pointer. | |
Koliseo * | kls_new_conf_alloc (ptrdiff_t size, KLS_Conf conf, kls_alloc_func alloc_func, kls_free_func kls_free_func) |
Takes a ptrdiff_t size, a KLS_Conf to configure the new Koliseo, an allocation function pointer and a free function pointer. | |
Koliseo * | kls_new_conf_ext (ptrdiff_t size, KLS_Conf conf, KLS_Hooks *ext_handlers, void **user, size_t ext_len) |
Takes a ptrdiff_t size and a KLS_Conf to configure the new Koliseo. | |
Koliseo * | kls_new_conf (ptrdiff_t size, KLS_Conf conf) |
Takes a ptrdiff_t size and a KLS_Conf to configure the new Koliseo. | |
Koliseo * | kls_new_traced_alloc_handled_ext (ptrdiff_t size, const char *output_path, kls_alloc_func alloc_func, kls_free_func free_func, KLS_Err_Handlers err_handlers, KLS_Hooks *ext_handlers, void **user, size_t ext_len) |
Takes a ptrdiff_t size, a filepath for the trace output file, an allocation function pointer and a free function pointer. | |
Koliseo * | kls_new_traced_alloc_handled (ptrdiff_t size, const char *output_path, kls_alloc_func alloc_func, kls_free_func free_func, KLS_Err_Handlers err_handlers) |
Takes a ptrdiff_t size, a filepath for the trace output file, an allocation function pointer and a free function pointer. | |
Koliseo * | kls_new_traced_ext (ptrdiff_t size, const char *output_path, KLS_Hooks *ext_handlers, void **user, size_t ext_len) |
Takes a ptrdiff_t size and a filepath for the trace output file. | |
Koliseo * | kls_new_traced_alloc (ptrdiff_t size, const char *output_path, kls_alloc_func alloc_func, kls_free_func free_func) |
Takes a ptrdiff_t size, a filepath for the trace output file, an allocation function pointer and a free function pointer. | |
Koliseo * | kls_new_traced (ptrdiff_t size, const char *output_path) |
Takes a ptrdiff_t size and a filepath for the trace output file. | |
Koliseo * | kls_new_traced_handled (ptrdiff_t size, const char *output_path, KLS_Err_Handlers err_handlers) |
Takes a ptrdiff_t size and a filepath for the trace output file. | |
Koliseo * | kls_new_dbg_alloc_handled_ext (ptrdiff_t size, kls_alloc_func alloc_func, kls_free_func free_func, KLS_Err_Handlers err_handlers, KLS_Hooks *ext_handlers, void **user, size_t ext_len) |
Takes a ptrdiff_t size, an allocation function pointer and a free function pointer, and returns a pointer to the prepared Koliseo. | |
Koliseo * | kls_new_dbg_alloc_handled (ptrdiff_t size, kls_alloc_func alloc_func, kls_free_func free_func, KLS_Err_Handlers err_handlers) |
Takes a ptrdiff_t size, an allocation function pointer and a free function pointer, and returns a pointer to the prepared Koliseo. | |
Koliseo * | kls_new_dbg_ext (ptrdiff_t size, KLS_Hooks *ext_handlers, void **user, size_t ext_len) |
Takes a ptrdiff_t size. | |
Koliseo * | kls_new_dbg_alloc (ptrdiff_t size, kls_alloc_func alloc_func, kls_free_func free_func) |
Takes a ptrdiff_t size, an allocation function pointer and a free function pointer, and returns a pointer to the prepared Koliseo. | |
Koliseo * | kls_new_dbg (ptrdiff_t size) |
Takes a ptrdiff_t size and returns a pointer to the prepared Koliseo. | |
Koliseo * | kls_new_dbg_handled (ptrdiff_t size, KLS_Err_Handlers err_handlers) |
Takes a ptrdiff_t size and returns a pointer to the prepared Koliseo. | |
int | kls__check_available_failable (Koliseo *kls, ptrdiff_t size, ptrdiff_t align, ptrdiff_t count, const char *caller_name) |
Takes a Koliseo, a ptrdiff_t size, align and count, and a caller name. | |
void * | kls_push_zero (Koliseo *kls, ptrdiff_t size, ptrdiff_t align, ptrdiff_t count) |
Takes a Koliseo pointer, and ptrdiff_t values for size, align and count. | |
void * | kls_push_zero_ext (Koliseo *kls, ptrdiff_t size, ptrdiff_t align, ptrdiff_t count) |
Takes a Koliseo pointer, and ptrdiff_t values for size, align and count. | |
void | kls_clear (Koliseo *kls) |
Resets the offset field for the passed Koliseo pointer. | |
void | kls_free (Koliseo *kls) |
Calls kls_clear() on the passed Koliseo pointer and the frees the actual Koliseo. | |
void | print_kls_2file (FILE *fp, const Koliseo *kls) |
Prints header fields from the passed Koliseo pointer, to the passed FILE pointer. | |
void | print_dbg_kls (const Koliseo *kls) |
Prints header fields from the passed Koliseo pointer, to stderr. | |
void | kls_formatSize (ptrdiff_t size, char *outputBuffer, size_t bufferSize) |
Converts a ptrdiff_t size to human-readable SI units (modulo 1000). | |
Koliseo_Temp * | kls_temp_start (Koliseo *kls) |
Starts a new savestate for the passed Koliseo pointer, by initialising its Koliseo_Temp pointer and returning it. | |
void | kls_temp_end (Koliseo_Temp *tmp_kls) |
Ends passed Koliseo_Temp pointer. | |
void * | kls_temp_push_zero_ext (Koliseo_Temp *t_kls, ptrdiff_t size, ptrdiff_t align, ptrdiff_t count) |
Takes a Koliseo_Temp, and ptrdiff_t values for size, align and count. | |
void | print_temp_kls_2file (FILE *fp, const Koliseo_Temp *t_kls) |
Prints header fields from the passed Koliseo_Temp pointer, to the passed FILE pointer. | |
void | print_dbg_temp_kls (const Koliseo_Temp *t_kls) |
Prints header fields from the passed Koliseo_Temp pointer, to stderr. | |
void * | kls_pop (Koliseo *kls, ptrdiff_t size, ptrdiff_t align, ptrdiff_t count) |
Takes a Koliseo pointer, and ptrdiff_t values for size, align and count. | |
void * | kls_pop_AR (Koliseo *kls, ptrdiff_t size, ptrdiff_t align, ptrdiff_t count) |
Takes a Koliseo pointer, and ptrdiff_t values for size, align and count. | |
void * | kls_temp_pop (Koliseo_Temp *t_kls, ptrdiff_t size, ptrdiff_t align, ptrdiff_t count) |
Takes a Koliseo_Temp, and ptrdiff_t values for size, align and count. | |
void * | kls_temp_pop_AR (Koliseo_Temp *t_kls, ptrdiff_t size, ptrdiff_t align, ptrdiff_t count) |
Takes a Koliseo_Temp, and ptrdiff_t values for size, align and count. | |
char * | kls_strdup (Koliseo *kls, char *source) |
Function to dupe a C string to a Koliseo, and return a pointer to the allocated string. | |
char ** | kls_strdup_arr (Koliseo *kls, size_t count, char **source) |
Function to dupe a C string array to a Koliseo, and return a pointer to the allocated array. | |
char * | kls_t_strdup (Koliseo_Temp *t_kls, char *source) |
Function to dupe a C string to a Koliseo_Temp, and return a pointer to the allocated string. | |
char ** | kls_t_strdup_arr (Koliseo_Temp *t_kls, size_t count, char **source) |
Function to dupe a C string array to a Koliseo_Temp, and return a pointer to the allocated array. |
Variables | |
KLS_Conf | KLS_DEFAULT_CONF |
Default KLS_Conf used by kls_new(). | |
KLS_Stats | KLS_STATS_DEFAULT |
Default KLS_Stats values, used by kls_new(). |
#define _POSIX_C_SOURCE 200809L |
#define kls__check_available | ( | kls, | |
size, | |||
align, | |||
count ) |
Macro to return NULL on errors from kls__check_available_failable.
#define KLS__STRCPY | ( | dest, | |
source ) |
Macro to copy a C string from a source buffer to a destination buffer.
Unsafe, do not use. Used in KLS_STRDUP() and KLS_STRDUP_T().
#define KLS_Arg | ( | kls | ) |
#define KLS_Conf_Arg | ( | conf | ) |
Defines a format macro for KLS_Conf args.
#define KLS_Conf_Fmt "KLS_Conf { collect_stats: %i, verbose_lvl: %i, log_filepath: \"%s\", log_fp: %p, block_while_has_temp: %i, allow_zerocount_push: %i }" |
Defines a format string for KLS_Conf.
#define KLS_DEFAULT_ALIGNMENT (2*sizeof(void *)) |
Represents a default alignment value.
Not used.
#define KLS_DEFAULT_ALLOCF malloc |
Defines the default allocation function.
#define KLS_DEFAULT_ERR_HANDLERS (KLS_Err_Handlers) { .OOM_handler = &KLS_OOM_default_handler__, .PTRDIFF_MAX_handler = &KLS_PTRDIFF_MAX_default_handler__, .ZEROCOUNT_handler = &KLS_ZEROCOUNT_default_handler__, } |
#define KLS_DEFAULT_EXTENSION_DATA NULL |
#define KLS_DEFAULT_EXTENSIONS_LEN 0 |
Defines how many extensions are loaded on kls_new() variants lacking explicit set of KLS_Hooks.
Useful to be redefined by an extension file, together with KLS_DEFAULT_HOOKS.
#define KLS_DEFAULT_FREEF free |
Defines the default free function.
#define KLS_DEFAULT_HOOKS &(KLS_Hooks){0} |
#define KLS_DEFAULT_SIZE (16*1024) |
Represents a simple default size for demo purposes.
#define KLS_MAJOR 0 |
Represents current major release.
#define KLS_MAX | ( | a, | |
b ) |
#define KLS_MAX_EXTENSIONS 1 |
#define KLS_MINOR 5 |
Represents current minor release.
#define KLS_PATCH 4 |
Represents current patch release.
#define KLS_POP | ( | kls, | |
type ) |
Macro used to "remove" memory from a Koliseo.
Rewinds the pointer by the requested type and returns a pointer to that memory before updating the Koliseo index. It's up to you to copy your item somewhere else before calling any PUSH operation again, as that memory should be overwritten.
#define KLS_POP_ARR | ( | kls, | |
type, | |||
count ) |
Macro used to "remove" memory as an array from a Koliseo.
Rewinds the pointer by the requested type and returns a pointer to that memory before updating the Koliseo index. It's up to you to copy your item somewhere else before calling any PUSH operation again, as that memory should be overwritten.
#define KLS_POP_ARR_T | ( | kls_temp, | |
type, | |||
count ) |
Macro used to "remove" memory as an array from a Koliseo_Temp.
Rewinds the pointer by the requested type and returns a pointer to that memory before updating the Koliseo_Temp index. It's up to you to copy your item somewhere else before calling any PUSH operation again, as that memory should be overwritten.
#define KLS_POP_STR | ( | kls, | |
cstr ) |
Macro to "remove" the memory for a C string from a Koliseo.
Rewinds the pointer by the string's memory and returns a pointer to that memory before updating the Koliseo index. It's up to you to copy your string somewhere else before calling any PUSH operation again, as that memory should be overwritten.
#define KLS_POP_STR_T | ( | kls_temp, | |
cstr ) |
Macro to "remove" the memory for a C string from a Koliseo_Temp.
Rewinds the pointer by the string's memory and returns a pointer to that memory before updating the Koliseo_Temp index. It's up to you to copy your string somewhere else before calling any PUSH operation again, as that memory should be overwritten.
#define KLS_POP_T | ( | kls_temp, | |
type ) |
Macro used to "remove" memory from a Koliseo_Temp.
Rewinds the pointer by the requested type and returns a pointer to that memory before updating the Koliseo_Temp index. It's up to you to copy your item somewhere else before calling any PUSH operation again, as that memory should be overwritten.
#define KLS_PUSH | ( | kls, | |
type ) |
Macro used to request memory from a Koliseo.
#define KLS_PUSH_ARR | ( | kls, | |
type, | |||
count ) |
Macro used to request memory for an array of type values from a Koliseo.
#define KLS_PUSH_ARR_NAMED | ( | kls, | |
type, | |||
count, | |||
name, | |||
desc ) |
Macro used to request memory for an array of type values from a Koliseo, and assign a name and a description to the region item.
#define KLS_PUSH_ARR_T | ( | kls_temp, | |
type, | |||
count ) |
Macro used to request memory for an array of type values from a Koliseo_Temp.
#define KLS_PUSH_ARR_T_NAMED | ( | kls_temp, | |
type, | |||
count, | |||
name, | |||
desc ) |
Macro used to request memory for an array of type values from a Koliseo_Temp, and assign a name and a description to the region item.
#define KLS_PUSH_ARR_T_TYPED | ( | kls_temp, | |
type, | |||
count, | |||
region_type, | |||
name, | |||
desc ) |
Macro used to request memory for an array of type values from a Koliseo_Temp, and assign a type, a name and a description to the region item.
#define KLS_PUSH_ARR_TYPED | ( | kls, | |
type, | |||
count, | |||
region_type, | |||
name, | |||
desc ) |
Macro used to request memory for an array of type values from a Koliseo, and assign a type, a name and a description to the region item.
#define KLS_PUSH_EX | ( | kls, | |
type, | |||
name ) |
Macro used to request memory from a Koliseo, and assign a name to the region item.
The description field is automatically filled with the stringized passed type.
#define KLS_PUSH_NAMED | ( | kls, | |
type, | |||
name, | |||
desc ) |
Macro used to request memory from a Koliseo, and assign a name and a description to the region item.
#define KLS_PUSH_STR | ( | kls, | |
cstr ) |
Macro to request memory for a C string from a Koliseo.
#define KLS_PUSH_STR_NAMED | ( | kls, | |
cstr, | |||
name, | |||
desc ) |
Macro to request memory for a C string from a Koliseo, and assign a name and a description to the region item.
#define KLS_PUSH_STR_T | ( | kls_temp, | |
cstr ) |
Macro to request memory for a C string from a Koliseo_Temp.
#define KLS_PUSH_STR_T_NAMED | ( | kls_temp, | |
cstr, | |||
name, | |||
desc ) |
Macro to request memory for a C string from a Koliseo_Temp, and assign a name and a description to the region item.
#define KLS_PUSH_STR_T_TYPED | ( | kls_temp, | |
cstr, | |||
region_type, | |||
name, | |||
desc ) |
Macro to request memory for a C string from a Koliseo_Temp, and assign a type, a name and a description to the region item.
#define KLS_PUSH_STR_TYPED | ( | kls, | |
cstr, | |||
region_type, | |||
name, | |||
desc ) |
Macro to request memory for a C string from a Koliseo, and assign a type, a name and a description to the region item.
#define KLS_PUSH_T | ( | kls_temp, | |
type ) |
Macro used to request memory from a Koliseo_Temp.
#define KLS_PUSH_T_EX | ( | kls_temp, | |
type, | |||
name ) |
Macro used to request memory from a Koliseo_Temp, and assign a name to the region item.
The description field is automatically filled with the stringized passed type.
#define KLS_PUSH_T_NAMED | ( | kls_temp, | |
type, | |||
name, | |||
desc ) |
Macro used to request memory from a Koliseo_Temp, and assign a name and a description to the region item.
#define KLS_PUSH_T_TYPED | ( | kls_temp, | |
type, | |||
region_type, | |||
name, | |||
desc ) |
Macro used to request memory from a Koliseo_Temp, and assign a type, a name and a description to the region item.
#define KLS_PUSH_T_TYPED_EX | ( | kls_temp, | |
type, | |||
region_type, | |||
name ) |
Macro used to request memory from a Koliseo_Temp, and assign a type and a name to the region item.
The description field is automatically filled with the stringized passed type.
#define KLS_PUSH_TYPED | ( | kls, | |
type, | |||
region_type, | |||
name, | |||
desc ) |
Macro used to request memory from a Koliseo, and assign a a type, a name and a description to the region item.
#define KLS_PUSH_TYPED_EX | ( | kls, | |
type, | |||
region_type, | |||
name ) |
Macro used to request memory from a Koliseo, and assign a type and a name to the region item.
The description field is automatically filled with the stringized passed type.
#define KLS_Stats_Arg | ( | stats | ) |
Defines a format macro for KLS_Stats args.
#define KLS_Stats_Fmt "KLS_Stats { tot_pushes: %i, tot_pops: %i, tot_temp_pushes: %i, tot_temp_pops: %i, tot_hiccups: %i, worst_push_time: %.7f }" |
Defines a format string for KLS_Stats.
#define KLS_STRDUP | ( | kls, | |
source ) |
#define KLS_STRDUP_T | ( | t_kls, | |
source ) |
#define KLSFmt "KLS {begin: %p, curr: %p, size: %li, offset: %li, has_temp: %i}" |
Defines a format string for Koliseo.
#define KOLISEO_H_ |
#define STRINGIFY | ( | x | ) |
#define STRINGIFY_2 | ( | x | ) |
typedef void * kls_alloc_func(size_t) |
Used to select an allocation function for the arena's backing memory.
typedef struct KLS_Err_Handlers KLS_Err_Handlers |
Defines the handlers used for errors in push calls.
typedef void kls_free_func(void *) |
Used to select a free function for the arena's backing memory.
typedef void KLS_hook_on_free(struct Koliseo *kls) |
Used to pass an extension handler for kls_free().
typedef void KLS_hook_on_new(struct Koliseo *kls) |
Used to pass an extension handler for kls_new_alloc().
typedef void KLS_hook_on_push(struct Koliseo *kls, ptrdiff_t padding, const char *caller, void *user) |
Used to pass an extension handler for kls_push().
typedef void KLS_hook_on_temp_free(struct Koliseo_Temp *t_kls) |
Used to pass an extension handler for kls_temp_end().
typedef void KLS_hook_on_temp_push(struct Koliseo_Temp *t_kls, ptrdiff_t padding, const char *caller, void *user) |
Used to pass an extension handler for kls_temp_push().
typedef void KLS_hook_on_temp_start(struct Koliseo_Temp *t_kls) |
Used to pass an extension handler for kls_temp_start().
typedef struct KLS_Hooks KLS_Hooks |
typedef void KLS_OOM_Handler(struct Koliseo *kls, ptrdiff_t available, ptrdiff_t padding, ptrdiff_t size, ptrdiff_t count) |
Used to pass an error handler for Out-Of-Memory error.
typedef void KLS_PTRDIFF_MAX_Handler(struct Koliseo *kls, ptrdiff_t size, ptrdiff_t count) |
Used to pass an error handler for count > (PTRDIFF_MAX / size) error.
typedef void KLS_ZEROCOUNT_Handler(struct Koliseo *kls, ptrdiff_t available, ptrdiff_t padding, ptrdiff_t size) |
Used to pass an error handler for zero-count push call error.
typedef struct Koliseo Koliseo |
Represents the initialised arena allocator struct.
typedef struct Koliseo_Temp Koliseo_Temp |
Represents a savestate for a Koliseo.
int int_koliseo_version | ( | void | ) |
Returns current koliseo version as an integer.
Returns current koliseo version as an integer.
int kls__check_available_failable | ( | Koliseo * | kls, |
ptrdiff_t | size, | ||
ptrdiff_t | align, | ||
ptrdiff_t | count, | ||
const char * | caller_name ) |
Takes a Koliseo, a ptrdiff_t size, align and count, and a caller name.
Checks if the passed Koliseo can fit the requested allocation. In case of errors, tries calling the appropriate handler.
kls | The Koliseo to check space for. |
size | The size of the type to allocate. |
align | The alignment of the type to allocate. |
count | The count of allocations. |
caller_name | Name for caller. Used for error reporting. |
void kls_clear | ( | Koliseo * | kls | ) |
KLS_Conf kls_conf_init | ( | int | collect_stats, |
int | verbose_lvl, | ||
int | block_while_has_temp, | ||
int | allow_zerocount_push, | ||
int | growable, | ||
FILE * | log_fp, | ||
const char * | log_filepath ) |
KLS_Conf kls_conf_init_handled | ( | int | collect_stats, |
int | verbose_lvl, | ||
int | block_while_has_temp, | ||
int | allow_zerocount_push, | ||
int | growable, | ||
FILE * | log_fp, | ||
const char * | log_filepath, | ||
KLS_Err_Handlers | err_handlers ) |
void kls_dbg_features | ( | void | ) |
Prints enabled Koliseo features to stderr.
void kls_formatSize | ( | ptrdiff_t | size, |
char * | outputBuffer, | ||
size_t | bufferSize ) |
Converts a ptrdiff_t size to human-readable SI units (modulo 1000).
Fills outputBuffer with the converted string.
size | The size at hand. |
outputBuffer | The output buffer. |
bufferSize | The output buffer size. |
void kls_free | ( | Koliseo * | kls | ) |
Calls kls_clear() on the passed Koliseo pointer and the frees the actual Koliseo.
kls | The Koliseo at hand. |
ptrdiff_t kls_get_pos | ( | const Koliseo * | kls | ) |
void kls_log | ( | Koliseo * | kls, |
const char * | tag, | ||
const char * | format, | ||
... ) |
Koliseo * kls_new | ( | ptrdiff_t | size | ) |
Takes a ptrdiff_t size.
Allocates the backing memory for a Koliseo. Sets the KLS_Conf field to KLS_DEFAULT_CONF. Sets the fields with appropriate values if memory allocation was successful, goes to exit() otherwise.
size | The size for Koliseo data field. |
Koliseo * kls_new_alloc | ( | ptrdiff_t | size, |
kls_alloc_func | alloc_func, | ||
kls_free_func | free_func ) |
Takes a ptrdiff_t size and a function pointer to the allocation function.
Allocates the backing memory for a Koliseo. Sets the KLS_Conf field to KLS_DEFAULT_CONF. Sets the fields with appropriate values if memory allocation was successful, goes to exit() otherwise.
size | The size for Koliseo data field. |
alloc_func | The allocation function to use to init the Koliseo. |
Koliseo * kls_new_alloc_ext | ( | ptrdiff_t | size, |
kls_alloc_func | alloc_func, | ||
kls_free_func | free_func, | ||
KLS_Hooks * | ext_handlers, | ||
void ** | user, | ||
size_t | ext_len ) |
Takes a ptrdiff_t size and a function pointer to the allocation function.
Additional arguments are for extensions. Allocates the backing memory for a Koliseo. Sets the KLS_Conf field to KLS_DEFAULT_CONF. Sets the fields with appropriate values if memory allocation was successful, goes to exit() otherwise.
size | The size for Koliseo data field. |
alloc_func | The allocation function to use to init the Koliseo. |
Koliseo * kls_new_conf_alloc | ( | ptrdiff_t | size, |
KLS_Conf | conf, | ||
kls_alloc_func | alloc_func, | ||
kls_free_func | free_func ) |
Takes a ptrdiff_t size, a KLS_Conf to configure the new Koliseo, an allocation function pointer and a free function pointer.
Additional arguments are for extensions. Calls kls_new_alloc() to initialise the Koliseo, then calls kls_set_conf() to update the config. Returns the new Koliseo.
size | The size for Koliseo data field. |
conf | The KLS_Conf for the new Koliseo. |
alloc_func | The allocation function to use. |
free_func | The free function to use. |
Koliseo * kls_new_conf_alloc_ext | ( | ptrdiff_t | size, |
KLS_Conf | conf, | ||
kls_alloc_func | alloc_func, | ||
kls_free_func | free_func, | ||
KLS_Hooks * | ext_handlers, | ||
void ** | user, | ||
size_t | ext_len ) |
Takes a ptrdiff_t size, a KLS_Conf to configure the new Koliseo, an allocation function pointer and a free function pointer.
Additional arguments are for extensions. Calls kls_new_alloc() to initialise the Koliseo, then calls kls_set_conf() to update the config. Returns the new Koliseo.
size | The size for Koliseo data field. |
conf | The KLS_Conf for the new Koliseo. |
alloc_func | The allocation function to use. |
free_func | The free function to use. |
Koliseo * kls_new_conf_ext | ( | ptrdiff_t | size, |
KLS_Conf | conf, | ||
KLS_Hooks * | ext_handlers, | ||
void ** | user, | ||
size_t | ext_len ) |
Koliseo * kls_new_dbg | ( | ptrdiff_t | size | ) |
Takes a ptrdiff_t size and returns a pointer to the prepared Koliseo.
Calls kls_new_conf_alloc() to initialise the Koliseo with the proper config for a debug Koliseo (printing to stderr).
size | The size for Koliseo data field. |
Koliseo * kls_new_dbg_alloc | ( | ptrdiff_t | size, |
kls_alloc_func | alloc_func, | ||
kls_free_func | free_func ) |
Takes a ptrdiff_t size, an allocation function pointer and a free function pointer, and returns a pointer to the prepared Koliseo.
Calls kls_new_conf_alloc() to initialise the Koliseo with the proper config for a debug Koliseo (printing to stderr).
size | The size for Koliseo data field. |
alloc_func | The allocation function to use. |
free_func | The free function to use. |
Koliseo * kls_new_dbg_alloc_handled | ( | ptrdiff_t | size, |
kls_alloc_func | alloc_func, | ||
kls_free_func | free_func, | ||
KLS_Err_Handlers | err_handlers ) |
Takes a ptrdiff_t size, an allocation function pointer and a free function pointer, and returns a pointer to the prepared Koliseo.
Calls kls_new_conf_alloc() to initialise the Koliseo with the proper config for a debug Koliseo (printing to stderr).
size | The size for Koliseo data field. |
alloc_func | The allocation function to use. |
free_func | The free function to use. |
err_handlers | The error handlers for errors in push calls. |
Koliseo * kls_new_dbg_alloc_handled_ext | ( | ptrdiff_t | size, |
kls_alloc_func | alloc_func, | ||
kls_free_func | free_func, | ||
KLS_Err_Handlers | err_handlers, | ||
KLS_Hooks * | ext_handlers, | ||
void ** | user, | ||
size_t | ext_len ) |
Takes a ptrdiff_t size, an allocation function pointer and a free function pointer, and returns a pointer to the prepared Koliseo.
Additional arguments are for extensions. Calls kls_new_conf_alloc() to initialise the Koliseo with the proper config for a debug Koliseo (printing to stderr).
size | The size for Koliseo data field. |
alloc_func | The allocation function to use. |
free_func | The free function to use. |
err_handlers | The error handlers for errors in push calls. |
Koliseo * kls_new_dbg_ext | ( | ptrdiff_t | size, |
KLS_Hooks * | ext_handlers, | ||
void ** | user, | ||
size_t | ext_len ) |
Takes a ptrdiff_t size.
Additional arguments are for extensions. Calls kls_new_conf_alloc() to initialise the Koliseo with the proper config for a debug Koliseo (printing to stderr).
size | The size for Koliseo data field. |
Koliseo * kls_new_dbg_handled | ( | ptrdiff_t | size, |
KLS_Err_Handlers | err_handlers ) |
Takes a ptrdiff_t size and returns a pointer to the prepared Koliseo.
Calls kls_new_conf_alloc() to initialise the Koliseo with the proper config for a debug Koliseo (printing to stderr).
size | The size for Koliseo data field. |
err_handlers | The error handlers for errors in push calls. |
Koliseo * kls_new_traced | ( | ptrdiff_t | size, |
const char * | output_path ) |
Takes a ptrdiff_t size and a filepath for the trace output file.
Returns a pointer to the prepared Koliseo. Calls kls_new_conf_alloc() to initialise the Koliseo with the proper config for a traced Koliseo, logging to the passed filepath.
size | The size for Koliseo data field. |
output_path | The filepath for log output. |
Koliseo * kls_new_traced_alloc | ( | ptrdiff_t | size, |
const char * | output_path, | ||
kls_alloc_func | alloc_func, | ||
kls_free_func | free_func ) |
Takes a ptrdiff_t size, a filepath for the trace output file, an allocation function pointer and a free function pointer.
Returns a pointer to the prepared Koliseo. Calls kls_new_conf_alloc() to initialise the Koliseo with the proper config for a traced Koliseo, logging to the passed filepath.
size | The size for Koliseo data field. |
output_path | The filepath for log output. |
alloc_func | The allocation function to use. |
free_func | The free function to use. |
Koliseo * kls_new_traced_alloc_handled | ( | ptrdiff_t | size, |
const char * | output_path, | ||
kls_alloc_func | alloc_func, | ||
kls_free_func | free_func, | ||
KLS_Err_Handlers | err_handlers ) |
Takes a ptrdiff_t size, a filepath for the trace output file, an allocation function pointer and a free function pointer.
Returns a pointer to the prepared Koliseo. Calls kls_new_conf_alloc() to initialise the Koliseo with the proper config for a traced Koliseo, logging to the passed filepath.
size | The size for Koliseo data field. |
output_path | The filepath for log output. |
alloc_func | The allocation function to use. |
free_func | The free function to use. |
err_handlers | The error handlers struct for errors in push calls. |
Koliseo * kls_new_traced_alloc_handled_ext | ( | ptrdiff_t | size, |
const char * | output_path, | ||
kls_alloc_func | alloc_func, | ||
kls_free_func | free_func, | ||
KLS_Err_Handlers | err_handlers, | ||
KLS_Hooks * | ext_handlers, | ||
void ** | user, | ||
size_t | ext_len ) |
Takes a ptrdiff_t size, a filepath for the trace output file, an allocation function pointer and a free function pointer.
Additional arguments are for extensions. Returns a pointer to the prepared Koliseo. Calls kls_new_conf_alloc() to initialise the Koliseo with the proper config for a traced Koliseo, logging to the passed filepath.
size | The size for Koliseo data field. |
output_path | The filepath for log output. |
alloc_func | The allocation function to use. |
free_func | The free function to use. |
err_handlers | The error handlers struct for errors in push calls. |
Koliseo * kls_new_traced_ext | ( | ptrdiff_t | size, |
const char * | output_path, | ||
KLS_Hooks * | ext_handlers, | ||
void ** | user, | ||
size_t | ext_len ) |
Takes a ptrdiff_t size and a filepath for the trace output file.
Additional arguments are for extensions. Returns a pointer to the prepared Koliseo. Calls kls_new_conf_alloc() to initialise the Koliseo with the proper config for a traced Koliseo, logging to the passed filepath.
size | The size for Koliseo data field. |
output_path | The filepath for log output. |
Koliseo * kls_new_traced_handled | ( | ptrdiff_t | size, |
const char * | output_path, | ||
KLS_Err_Handlers | err_handlers ) |
Takes a ptrdiff_t size and a filepath for the trace output file.
Returns a pointer to the prepared Koliseo. Calls kls_new_conf_alloc() to initialise the Koliseo with the proper config for a traced Koliseo, logging to the passed filepath.
size | The size for Koliseo data field. |
output_path | The filepath for log output. |
err_handlers | The error handlers struct for errors in push calls. |
void KLS_OOM_default_handler__ | ( | Koliseo * | kls, |
ptrdiff_t | available, | ||
ptrdiff_t | padding, | ||
ptrdiff_t | size, | ||
ptrdiff_t | count ) |
void * kls_pop | ( | Koliseo * | kls, |
ptrdiff_t | size, | ||
ptrdiff_t | align, | ||
ptrdiff_t | count ) |
Takes a Koliseo pointer, and ptrdiff_t values for size, align and count.
Tries popping the specified amount of memory from the Koliseo data field, marking it as free (as far as Koliseo is concerned), or goes to exit() if the operation fails.
kls | The Koliseo at hand. |
size | The size for data to pop. |
align | The alignment for data to pop. |
count | The multiplicative quantity to scale data size to pop for. |
void * kls_pop_AR | ( | Koliseo * | kls, |
ptrdiff_t | size, | ||
ptrdiff_t | align, | ||
ptrdiff_t | count ) |
Takes a Koliseo pointer, and ptrdiff_t values for size, align and count.
Tries popping the specified amount of memory from the Koliseo data field, marking it as free (as far as Koliseo is concerned), or goes to exit() if the operation fails.
kls | The Koliseo at hand. |
size | The size for data to pop. |
align | The alignment for data to pop. |
count | The multiplicative quantity to scale data size to pop for. |
void KLS_PTRDIFF_MAX_default_handler__ | ( | struct Koliseo * | kls, |
ptrdiff_t | size, | ||
ptrdiff_t | count ) |
Used by default when no handler is passed.
void * kls_push_zero | ( | Koliseo * | kls, |
ptrdiff_t | size, | ||
ptrdiff_t | align, | ||
ptrdiff_t | count ) |
Takes a Koliseo pointer, and ptrdiff_t values for size, align and count.
Tries pushing the specified amount of memory to the Koliseo data field, or goes to exit() if the operation fails. Notably, it zeroes the memory region.
kls | The Koliseo at hand. |
size | The size for data to push. |
align | The alignment for data to push. |
count | The multiplicative quantity to scale data size to push for. |
void * kls_push_zero_ext | ( | Koliseo * | kls, |
ptrdiff_t | size, | ||
ptrdiff_t | align, | ||
ptrdiff_t | count ) |
Takes a Koliseo pointer, and ptrdiff_t values for size, align and count.
Tries pushing the specified amount of memory to the Koliseo data field, or goes to exit() if the operation fails. Notably, it zeroes the memory region.
kls | The Koliseo at hand. |
size | The size for data to push. |
align | The alignment for data to push. |
count | The multiplicative quantity to scale data size to push for. |
char * kls_strdup | ( | Koliseo * | kls, |
char * | source ) |
Function to dupe a C string to a Koliseo, and return a pointer to the allocated string.
Unsafe, do not use.
char ** kls_strdup_arr | ( | Koliseo * | kls, |
size_t | count, | ||
char ** | source ) |
Function to dupe a C string array to a Koliseo, and return a pointer to the allocated array.
Unsafe, do not use.
char * kls_t_strdup | ( | Koliseo_Temp * | t_kls, |
char * | source ) |
Function to dupe a C string to a Koliseo_Temp, and return a pointer to the allocated string.
Unsafe, do not use.
char ** kls_t_strdup_arr | ( | Koliseo_Temp * | t_kls, |
size_t | count, | ||
char ** | source ) |
Function to dupe a C string array to a Koliseo_Temp, and return a pointer to the allocated array.
Unsafe, do not use.
void kls_temp_end | ( | Koliseo_Temp * | tmp_kls | ) |
Ends passed Koliseo_Temp pointer.
tmp_kls | The Koliseo_Temp at hand. |
void * kls_temp_pop | ( | Koliseo_Temp * | t_kls, |
ptrdiff_t | size, | ||
ptrdiff_t | align, | ||
ptrdiff_t | count ) |
Takes a Koliseo_Temp, and ptrdiff_t values for size, align and count.
Tries popping the specified amount of memory from the Koliseo data field, marking it as free (as far as Koliseo is concerned), or goes to exit() if the operation fails.
t_kls | The Koliseo_Temp at hand. |
size | The size for data to pop. |
align | The alignment for data to pop. |
count | The multiplicative quantity to scale data size to pop for. |
void * kls_temp_pop_AR | ( | Koliseo_Temp * | t_kls, |
ptrdiff_t | size, | ||
ptrdiff_t | align, | ||
ptrdiff_t | count ) |
Takes a Koliseo_Temp, and ptrdiff_t values for size, align and count.
Tries popping the specified amount of memory from the Koliseo data field, marking it as free (as far as Koliseo is concerned), or goes to exit() if the operation fails.
t_kls | The Koliseo_Temp at hand. |
size | The size for data to pop. |
align | The alignment for data to pop. |
count | The multiplicative quantity to scale data size to pop for. |
void * kls_temp_push_zero_ext | ( | Koliseo_Temp * | t_kls, |
ptrdiff_t | size, | ||
ptrdiff_t | align, | ||
ptrdiff_t | count ) |
Takes a Koliseo_Temp, and ptrdiff_t values for size, align and count.
Tries pushing the specified amount of memory to the referred Koliseo data field, or goes to exit() if the operation fails. Notably, it zeroes the memory region. Will be removed in 0.6, leaving kls_temp_push_zero_ext() as its replacement.
t_kls | The Koliseo_Temp at hand. |
size | The size for data to push. |
align | The alignment for data to push. |
count | The multiplicative quantity to scale data size to push for. |
Koliseo_Temp * kls_temp_start | ( | Koliseo * | kls | ) |
Starts a new savestate for the passed Koliseo pointer, by initialising its Koliseo_Temp pointer and returning it.
Notably, you should not use the original while using the copy.
kls | The Koliseo at hand. |
void KLS_ZEROCOUNT_default_handler__ | ( | Koliseo * | kls, |
ptrdiff_t | available, | ||
ptrdiff_t | padding, | ||
ptrdiff_t | size ) |
void print_dbg_kls | ( | const Koliseo * | kls | ) |
void print_dbg_temp_kls | ( | const Koliseo_Temp * | t_kls | ) |
Prints header fields from the passed Koliseo_Temp pointer, to stderr.
t_kls | The Koliseo_Temp at hand. |
void print_kls_2file | ( | FILE * | fp, |
const Koliseo * | kls ) |
void print_temp_kls_2file | ( | FILE * | fp, |
const Koliseo_Temp * | t_kls ) |
Prints header fields from the passed Koliseo_Temp pointer, to the passed FILE pointer.
fp | The FILE pointer to print to. |
t_kls | The Koliseo_Temp at hand. |
const char * string_koliseo_version | ( | void | ) |
Returns current koliseo version as a string.
Returns current koliseo version as a string.
|
extern |