koliseo 0.4.9
Loading...
Searching...
No Matches
kls_region.h File Reference
#include <time.h>
#include <stddef.h>
#include <assert.h>
#include "koliseo.h"

Go to the source code of this file.

Data Structures

struct  KLS_Region
 Represents an allocated memory region in a Koliseo. More...
struct  KLS_list_region
 Defines the node for a KLS_Region_List. More...
struct  KLS_Autoregion_Extension_Conf
struct  KLS_Autoregion_Extension_Data

Macros

#define _POSIX_C_SOURCE   200809L
#define KLS_AUTOREGION_ALLOC_DEFAULT   KLS_REGLIST_ALLOC_KLS_BASIC
#define KLS_AUTOREGION_REGLIST_SIZE_DEFAULT   KLS_DEFAULT_SIZE
#define KLS_AUTOREGION_AUTOSET_TEMP_DEFAULT   1
#define KLS_AUTOREGION_ALLOC_TEMP_DEFAULT   KLS_REGLIST_ALLOC_KLS_BASIC
#define KLS_AUTOREGION_REGLIST_TEMP_SIZE_DEFAULT   KLS_DEFAULT_SIZE
#define KLS_REGIONTYPE_MAX   KLS_Header
 Defines max index for Koliseo's own Region_Type values.
#define KLS_REGION_MAX_NAME_SIZE   15
 Defines max size for KLS_Region's name field.
#define KLS_REGION_MAX_DESC_SIZE   20
 Defines max size for KLS_Region's desc field.
#define KLS_DEFAULT_HOOKS
#define KLS_PUSH_ARR_NAMED(kls, type, count, name, desc)
#define KLS_PUSH_ARR_TYPED(kls, type, count, region_type, name, desc)
#define KLS_PUSH_ARR_T_NAMED(kls_temp, type, count, name, desc)
#define KLS_PUSH_ARR_T_TYPED(kls_temp, type, count, region_type, name, desc)
#define KLS_RL_GETLIST()
#define KLS_RL_FREELIST(kls_list)
#define kls_showList(list)
#define kls_showList_toFile(list, fp)
#define KLS_RL_ECHOLIST(kls_list)
#define KLS_RL_PRINTLIST(kls_list, file)
#define KLS_RL_PUSHLIST(kls, reg, kls_list)
#define KLS_RL_PUSHLIST_P(kls, reg, kls_list)
#define KLS_RL_DIFF(kls, kls_list1, kls_list2)

Typedefs

typedef enum KLS_RegList_Alloc_Backend KLS_RegList_Alloc_Backend
 Defines allocation backend for KLS_Region_List items.
typedef enum KLS_Region_Type KLS_Region_Type
 Represents a type index for Regions.
typedef struct KLS_Region KLS_Region
 Represents an allocated memory region in a Koliseo.
typedef KLS_RegionKLS_list_element
 Redundant typedef to better denote the actual value field of a KLS_region_list_item.
typedef struct KLS_list_region KLS_region_list_item
 Defines the node for a KLS_Region_List.
typedef KLS_region_list_itemKLS_Region_List
typedef struct KLS_Autoregion_Extension_Conf KLS_Autoregion_Extension_Conf
typedef struct KLS_Autoregion_Extension_Data KLS_Autoregion_Extension_Data

Enumerations

enum  KLS_RegList_Alloc_Backend { KLS_REGLIST_ALLOC_LIBC = 0 , KLS_REGLIST_ALLOC_KLS_BASIC , KLS_REGLIST_TOTAL_BACKENDS }
 Defines allocation backend for KLS_Region_List items. More...
enum  KLS_Region_Type { KLS_None = 0 , Temp_KLS_Header = 1 , KLS_Header = 2 }
 Represents a type index for Regions. More...

Functions

const char * kls_reglist_backend_string (KLS_RegList_Alloc_Backend kls_be)
 Returns the string corresponding to passed kls_be.
void KLS_autoregion_on_new (struct Koliseo *kls)
void KLS_autoregion_on_free (struct Koliseo *kls)
void KLS_autoregion_on_push (struct Koliseo *kls, ptrdiff_t padding, const char *caller, void *user)
void KLS_autoregion_on_temp_start (struct Koliseo_Temp *t_kls)
void KLS_autoregion_on_temp_free (struct Koliseo_Temp *t_kls)
void KLS_autoregion_on_temp_push (struct Koliseo_Temp *t_kls, ptrdiff_t padding, const char *caller, void *user)
void * kls_push_zero_named (Koliseo *kls, ptrdiff_t size, ptrdiff_t align, ptrdiff_t count, char *name, char *desc)
 Takes a Koliseo pointer, and ptrdiff_t values for size, align and count.
void * kls_push_zero_typed (Koliseo *kls, ptrdiff_t size, ptrdiff_t align, ptrdiff_t count, int type, char *name, char *desc)
 Takes a Koliseo pointer, a KLS_Region_Type index, and ptrdiff_t values for size, align and count.
void * kls_temp_push_zero_named (Koliseo_Temp *t_kls, ptrdiff_t size, ptrdiff_t align, ptrdiff_t count, char *name, char *desc)
 Takes a Koliseo_Temp, and ptrdiff_t values for size, align and count.
void * kls_temp_push_zero_typed (Koliseo_Temp *t_kls, ptrdiff_t size, ptrdiff_t align, ptrdiff_t count, int type, char *name, char *desc)
 Takes a Koliseo_Temp, a KLS_Region_Type index, and ptrdiff_t values for size, align and count.
KLS_Region_List kls_rl_emptyList (void)
bool kls_rl_empty (KLS_Region_List)
KLS_list_element kls_rl_head (KLS_Region_List)
KLS_Region_List kls_rl_tail (KLS_Region_List)
KLS_Region_List kls_rl_cons (Koliseo *, KLS_list_element, KLS_Region_List)
KLS_Region_List kls_rl_t_cons (Koliseo_Temp *, KLS_list_element, KLS_Region_List)
void kls_rl_freeList (KLS_Region_List)
 Frees all values and nodes for passed Region list.
void kls_rl_showList (KLS_Region_List)
void kls_rl_showList_toFile (KLS_Region_List, FILE *fp)
bool kls_rl_member (KLS_list_element, KLS_Region_List)
int kls_rl_length (KLS_Region_List)
KLS_Region_List kls_rl_append (Koliseo *, KLS_Region_List, KLS_Region_List)
KLS_Region_List kls_rl_reverse (Koliseo *, KLS_Region_List)
KLS_Region_List kls_rl_copy (Koliseo *, KLS_Region_List)
KLS_Region_List kls_rl_delete (Koliseo *, KLS_list_element, KLS_Region_List)
KLS_Region_List kls_rl_insord (Koliseo *, KLS_list_element, KLS_Region_List)
KLS_Region_List kls_rl_insord_p (Koliseo *, KLS_list_element, KLS_Region_List)
bool kls_rl_isLess (KLS_list_element, KLS_list_element)
bool kls_rl_isEqual (KLS_list_element, KLS_list_element)
KLS_Region_List kls_rl_mergeList (Koliseo *, KLS_Region_List, KLS_Region_List)
KLS_Region_List kls_rl_intersect (Koliseo *, KLS_Region_List, KLS_Region_List)
KLS_Region_List kls_rl_diff (Koliseo *, KLS_Region_List, KLS_Region_List)
double kls_usageShare (KLS_list_element, Koliseo *)
ptrdiff_t kls_regionSize (KLS_list_element)
ptrdiff_t kls_avg_regionSize (Koliseo *)
 Return average region size in usage for the passed Koliseo.
void kls_usageReport_toFile (Koliseo *, FILE *)
 Prints an usage report for the passed Koliseo to the passed file.
void kls_usageReport (Koliseo *)
 Print usage report for passed Koliseo to stdout.
ptrdiff_t kls_type_usage (int, Koliseo *)
 Calc memory used by the specific type of KLS_list_element.
ptrdiff_t kls_total_padding (Koliseo *)
 Calc memory used as padding for the passed Koliseo.

Variables

const char * kls_reglist_backend_strings [KLS_REGLIST_TOTAL_BACKENDS]
 Defines strings for KLS_RegList_Alloc_Backend values.

Macro Definition Documentation

◆ _POSIX_C_SOURCE

#define _POSIX_C_SOURCE   200809L

◆ KLS_AUTOREGION_ALLOC_DEFAULT

#define KLS_AUTOREGION_ALLOC_DEFAULT   KLS_REGLIST_ALLOC_KLS_BASIC

◆ KLS_AUTOREGION_ALLOC_TEMP_DEFAULT

#define KLS_AUTOREGION_ALLOC_TEMP_DEFAULT   KLS_REGLIST_ALLOC_KLS_BASIC

◆ KLS_AUTOREGION_AUTOSET_TEMP_DEFAULT

#define KLS_AUTOREGION_AUTOSET_TEMP_DEFAULT   1

◆ KLS_AUTOREGION_REGLIST_SIZE_DEFAULT

#define KLS_AUTOREGION_REGLIST_SIZE_DEFAULT   KLS_DEFAULT_SIZE

◆ KLS_AUTOREGION_REGLIST_TEMP_SIZE_DEFAULT

#define KLS_AUTOREGION_REGLIST_TEMP_SIZE_DEFAULT   KLS_DEFAULT_SIZE

◆ KLS_DEFAULT_HOOKS

#define KLS_DEFAULT_HOOKS
Value:
(KLS_Hooks) { \
.on_new_handler = &KLS_autoregion_on_new, \
.on_free_handler = &KLS_autoregion_on_free, \
.on_push_handler = &KLS_autoregion_on_push, \
.on_temp_start_handler = &KLS_autoregion_on_temp_start, \
.on_temp_free_handler = &KLS_autoregion_on_temp_free, \
.on_temp_push_handler = &KLS_autoregion_on_temp_push, \
}
void KLS_autoregion_on_free(struct Koliseo *kls)
Definition kls_region.c:1416
void KLS_autoregion_on_new(struct Koliseo *kls)
Definition kls_region.c:1337
void KLS_autoregion_on_temp_push(struct Koliseo_Temp *t_kls, ptrdiff_t padding, const char *caller, void *user)
Definition kls_region.c:1553
void KLS_autoregion_on_temp_free(struct Koliseo_Temp *t_kls)
Definition kls_region.c:1520
void KLS_autoregion_on_push(struct Koliseo *kls, ptrdiff_t padding, const char *caller, void *user)
Definition kls_region.c:1434
void KLS_autoregion_on_temp_start(struct Koliseo_Temp *t_kls)
Definition kls_region.c:1455

◆ KLS_PUSH_ARR_NAMED

#define KLS_PUSH_ARR_NAMED ( kls,
type,
count,
name,
desc )
Value:
(type*)kls_push_zero_named((kls), sizeof(type), _Alignof(type), (count), (name), (desc))
void * kls_push_zero_named(Koliseo *kls, ptrdiff_t size, ptrdiff_t align, ptrdiff_t count, char *name, char *desc)
Takes a Koliseo pointer, and ptrdiff_t values for size, align and count.
Definition kls_region.c:960

◆ KLS_PUSH_ARR_T_NAMED

#define KLS_PUSH_ARR_T_NAMED ( kls_temp,
type,
count,
name,
desc )
Value:
(type*)kls_temp_push_zero_named((kls_temp), sizeof(type), _Alignof(type), (count), (name), (desc))
void * kls_temp_push_zero_named(Koliseo_Temp *t_kls, ptrdiff_t size, ptrdiff_t align, ptrdiff_t count, char *name, char *desc)
Takes a Koliseo_Temp, and ptrdiff_t values for size, align and count.
Definition kls_region.c:1058

◆ KLS_PUSH_ARR_T_TYPED

#define KLS_PUSH_ARR_T_TYPED ( kls_temp,
type,
count,
region_type,
name,
desc )
Value:
(type*)kls_temp_push_zero_typed((kls_temp), sizeof(type), _Alignof(type), (count), (region_type), (name), (desc))
void * kls_temp_push_zero_typed(Koliseo_Temp *t_kls, ptrdiff_t size, ptrdiff_t align, ptrdiff_t count, int type, char *name, char *desc)
Takes a Koliseo_Temp, a KLS_Region_Type index, and ptrdiff_t values for size, align and count.
Definition kls_region.c:1254

◆ KLS_PUSH_ARR_TYPED

#define KLS_PUSH_ARR_TYPED ( kls,
type,
count,
region_type,
name,
desc )
Value:
(type*)kls_push_zero_typed((kls), sizeof(type), _Alignof(type), (count), (region_type), (name), (desc))
void * kls_push_zero_typed(Koliseo *kls, ptrdiff_t size, ptrdiff_t align, ptrdiff_t count, int type, char *name, char *desc)
Takes a Koliseo pointer, a KLS_Region_Type index, and ptrdiff_t values for size, align and count.
Definition kls_region.c:1157

◆ KLS_REGION_MAX_DESC_SIZE

#define KLS_REGION_MAX_DESC_SIZE   20

Defines max size for KLS_Region's desc field.

See also
KLS_Region

◆ KLS_REGION_MAX_NAME_SIZE

#define KLS_REGION_MAX_NAME_SIZE   15

Defines max size for KLS_Region's name field.

See also
KLS_Region

◆ KLS_REGIONTYPE_MAX

#define KLS_REGIONTYPE_MAX   KLS_Header

Defines max index for Koliseo's own Region_Type values.

See also
Region_Type

◆ KLS_RL_DIFF

#define KLS_RL_DIFF ( kls,
kls_list1,
kls_list2 )
Value:
kls_rl_diff(kls,kls_list1,kls_list2)
KLS_Region_List kls_rl_diff(Koliseo *kls, KLS_Region_List l1, KLS_Region_List l2)
Definition kls_region.c:547

◆ KLS_RL_ECHOLIST

#define KLS_RL_ECHOLIST ( kls_list)
Value:
kls_rl_showList(kls_list)
void kls_rl_showList(KLS_Region_List l)
Definition kls_region.c:302

◆ KLS_RL_FREELIST

#define KLS_RL_FREELIST ( kls_list)
Value:
kls_rl_freeList(kls_list)
void kls_rl_freeList(KLS_Region_List l)
Frees all values and nodes for passed Region list.
Definition kls_region.c:244

◆ KLS_RL_GETLIST

#define KLS_RL_GETLIST ( )
Value:
KLS_Region_List kls_rl_emptyList(void)
Definition kls_region.c:62

◆ KLS_RL_PRINTLIST

#define KLS_RL_PRINTLIST ( kls_list,
file )
Value:
kls_rl_showList_toFile(kls_list,file)
void kls_rl_showList_toFile(KLS_Region_List l, FILE *fp)
Definition kls_region.c:263

◆ KLS_RL_PUSHLIST

#define KLS_RL_PUSHLIST ( kls,
reg,
kls_list )
Value:
kls_rl_insord(kls,reg,kls_list)
KLS_Region_List kls_rl_insord(Koliseo *kls, KLS_list_element el, KLS_Region_List l)
Definition kls_region.c:386

◆ KLS_RL_PUSHLIST_P

#define KLS_RL_PUSHLIST_P ( kls,
reg,
kls_list )
Value:
kls_rl_insord_p(kls,reg,kls_list)
KLS_Region_List kls_rl_insord_p(Koliseo *kls, KLS_list_element el, KLS_Region_List l)
Definition kls_region.c:404

◆ kls_showList

#define kls_showList ( list)
Value:

◆ kls_showList_toFile

#define kls_showList_toFile ( list,
fp )
Value:

Typedef Documentation

◆ KLS_Autoregion_Extension_Conf

typedef struct KLS_Autoregion_Extension_Conf KLS_Autoregion_Extension_Conf

◆ KLS_Autoregion_Extension_Data

typedef struct KLS_Autoregion_Extension_Data KLS_Autoregion_Extension_Data

◆ KLS_list_element

Redundant typedef to better denote the actual value field of a KLS_region_list_item.

◆ KLS_Region

typedef struct KLS_Region KLS_Region

Represents an allocated memory region in a Koliseo.

See also
KLS_PUSH()
KLS_PUSH_NAMED()

◆ KLS_Region_List

◆ KLS_region_list_item

Defines the node for a KLS_Region_List.

See also
KLS_list_element

◆ KLS_Region_Type

Represents a type index for Regions.

See also
KLS_PUSH_TYPED()

◆ KLS_RegList_Alloc_Backend

Defines allocation backend for KLS_Region_List items.

See also
Koliseo
kls_new_traced_AR_KLS()

Enumeration Type Documentation

◆ KLS_Region_Type

Represents a type index for Regions.

See also
KLS_PUSH_TYPED()
Enumerator
KLS_None 
Temp_KLS_Header 
KLS_Header 

◆ KLS_RegList_Alloc_Backend

Defines allocation backend for KLS_Region_List items.

See also
Koliseo
kls_new_traced_AR_KLS()
Enumerator
KLS_REGLIST_ALLOC_LIBC 
KLS_REGLIST_ALLOC_KLS_BASIC 
KLS_REGLIST_TOTAL_BACKENDS 

Function Documentation

◆ KLS_autoregion_on_free()

void KLS_autoregion_on_free ( struct Koliseo * kls)

◆ KLS_autoregion_on_new()

void KLS_autoregion_on_new ( struct Koliseo * kls)

◆ KLS_autoregion_on_push()

void KLS_autoregion_on_push ( struct Koliseo * kls,
ptrdiff_t padding,
const char * caller,
void * user )

◆ KLS_autoregion_on_temp_free()

void KLS_autoregion_on_temp_free ( struct Koliseo_Temp * t_kls)

◆ KLS_autoregion_on_temp_push()

void KLS_autoregion_on_temp_push ( struct Koliseo_Temp * t_kls,
ptrdiff_t padding,
const char * caller,
void * user )

◆ KLS_autoregion_on_temp_start()

void KLS_autoregion_on_temp_start ( struct Koliseo_Temp * t_kls)

◆ kls_avg_regionSize()

ptrdiff_t kls_avg_regionSize ( Koliseo * kls)

Return average region size in usage for the passed Koliseo.

Parameters
klsThe Koliseo to check usage for.
Returns
Average region size as ptrdiff_t.

◆ kls_push_zero_named()

void * kls_push_zero_named ( Koliseo * kls,
ptrdiff_t size,
ptrdiff_t align,
ptrdiff_t count,
char * name,
char * desc )

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. Uses the passed name and desc fields to initialise the allocated KLS_Region fields. Notably, it zeroes the memory region.

Parameters
klsThe Koliseo at hand.
sizeThe size for data to push.
alignThe alignment for data to push.
countThe multiplicative quantity to scale data size to push for.
nameThe name to assign to the resulting KLS_Region.
descThe desc to assign to the resulting KLS_Region.
Returns
A void pointer to the start of memory just pushed to the Koliseo.

◆ kls_push_zero_typed()

void * kls_push_zero_typed ( Koliseo * kls,
ptrdiff_t size,
ptrdiff_t align,
ptrdiff_t count,
int type,
char * name,
char * desc )

Takes a Koliseo pointer, a KLS_Region_Type index, 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. Uses the passed name and desc fields to initialise the allocated KLS_Region fields. Notably, it zeroes the memory region.

Parameters
klsThe Koliseo at hand.
sizeThe size for data to push.
alignThe alignment for data to push.
countThe multiplicative quantity to scale data size to push for.
typeThe type index for pushed KLS_Region.
nameThe name to assign to the resulting KLS_Region.
descThe desc to assign to the resulting KLS_Region.
Returns
A void pointer to the start of memory just pushed to the Koliseo.

◆ kls_regionSize()

ptrdiff_t kls_regionSize ( KLS_list_element )

◆ kls_reglist_backend_string()

const char * kls_reglist_backend_string ( KLS_RegList_Alloc_Backend kls_be)

Returns the string corresponding to passed kls_be.

See also
KLS_RegList_Alloc_Backend
kls_reglist_backend_strings

◆ kls_rl_append()

KLS_Region_List kls_rl_append ( Koliseo * kls,
KLS_Region_List l1,
KLS_Region_List l2 )

◆ kls_rl_cons()

KLS_Region_List kls_rl_cons ( Koliseo * kls,
KLS_list_element e,
KLS_Region_List l )

◆ kls_rl_copy()

KLS_Region_List kls_rl_copy ( Koliseo * kls,
KLS_Region_List l )

◆ kls_rl_delete()

KLS_Region_List kls_rl_delete ( Koliseo * kls,
KLS_list_element el,
KLS_Region_List l )

◆ kls_rl_diff()

KLS_Region_List kls_rl_diff ( Koliseo * kls,
KLS_Region_List l1,
KLS_Region_List l2 )

◆ kls_rl_empty()

bool kls_rl_empty ( KLS_Region_List l)

◆ kls_rl_emptyList()

KLS_Region_List kls_rl_emptyList ( void )

◆ kls_rl_freeList()

void kls_rl_freeList ( KLS_Region_List l)

Frees all values and nodes for passed Region list.

Should only be used internally for operations with ALLOC_LIBC for allocation backend.

Parameters
lThe list to free (allocated by using malloc).

◆ kls_rl_head()

◆ kls_rl_insord()

KLS_Region_List kls_rl_insord ( Koliseo * kls,
KLS_list_element el,
KLS_Region_List l )

◆ kls_rl_insord_p()

KLS_Region_List kls_rl_insord_p ( Koliseo * kls,
KLS_list_element el,
KLS_Region_List l )

◆ kls_rl_intersect()

KLS_Region_List kls_rl_intersect ( Koliseo * kls,
KLS_Region_List l1,
KLS_Region_List l2 )

◆ kls_rl_isEqual()

bool kls_rl_isEqual ( KLS_list_element ,
KLS_list_element  )

◆ kls_rl_isLess()

bool kls_rl_isLess ( KLS_list_element ,
KLS_list_element  )

◆ kls_rl_length()

int kls_rl_length ( KLS_Region_List l)

◆ kls_rl_member()

bool kls_rl_member ( KLS_list_element el,
KLS_Region_List l )

◆ kls_rl_mergeList()

KLS_Region_List kls_rl_mergeList ( Koliseo * kls,
KLS_Region_List l1,
KLS_Region_List l2 )

◆ kls_rl_reverse()

KLS_Region_List kls_rl_reverse ( Koliseo * kls,
KLS_Region_List l )

◆ kls_rl_showList()

void kls_rl_showList ( KLS_Region_List l)

◆ kls_rl_showList_toFile()

void kls_rl_showList_toFile ( KLS_Region_List l,
FILE * fp )

◆ kls_rl_t_cons()

KLS_Region_List kls_rl_t_cons ( Koliseo_Temp * t_kls,
KLS_list_element e,
KLS_Region_List l )

◆ kls_rl_tail()

KLS_Region_List kls_rl_tail ( KLS_Region_List l)

◆ kls_temp_push_zero_named()

void * kls_temp_push_zero_named ( Koliseo_Temp * t_kls,
ptrdiff_t size,
ptrdiff_t align,
ptrdiff_t count,
char * name,
char * desc )

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. Uses the passed name and desc fields to initialise the allocated KLS_Region fields. Notably, it zeroes the memory region.

Parameters
t_klsThe Koliseo_Temp at hand.
sizeThe size for data to push.
alignThe alignment for data to push.
countThe multiplicative quantity to scale data size to push for.
nameThe name to assign to the resulting KLS_Region.
descThe desc to assign to the resulting KLS_Region.
Returns
A void pointer to the start of memory just pushed to the Koliseo.

◆ kls_temp_push_zero_typed()

void * kls_temp_push_zero_typed ( Koliseo_Temp * t_kls,
ptrdiff_t size,
ptrdiff_t align,
ptrdiff_t count,
int type,
char * name,
char * desc )

Takes a Koliseo_Temp, a KLS_Region_Type index, 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. Uses the passed name and desc fields to initialise the allocated KLS_Region fields. Notably, it zeroes the memory region.

Parameters
t_klsThe Koliseo_Temp at hand.
sizeThe size for data to push.
alignThe alignment for data to push.
countThe multiplicative quantity to scale data size to push for.
typeThe type index for pushed KLS_Region.
nameThe name to assign to the resulting KLS_Region.
descThe desc to assign to the resulting KLS_Region.
Returns
A void pointer to the start of memory just pushed to the referred Koliseo.

◆ kls_total_padding()

ptrdiff_t kls_total_padding ( Koliseo * kls)

Calc memory used as padding for the passed Koliseo.

See also
KLS_Region_List
Parameters
klsThe Koliseo to check total padding for.
Returns
The total padding size as ptrdiff_t.

◆ kls_type_usage()

ptrdiff_t kls_type_usage ( int type,
Koliseo * kls )

Calc memory used by the specific type of KLS_list_element.

See also
KLS_Region_List
Parameters
typeThe integer corresponding to element->type
klsThe Koliseo to check usage for.
Returns
The used memory size as ptrdiff_t.

◆ kls_usageReport()

void kls_usageReport ( Koliseo * kls)

Print usage report for passed Koliseo to stdout.

See also
kls_usageReport_toFile()
Parameters
klsThe Koliseo to print info for.

◆ kls_usageReport_toFile()

void kls_usageReport_toFile ( Koliseo * kls,
FILE * fp )

Prints an usage report for the passed Koliseo to the passed file.

See also
kls_usageShare()
Parameters
klsThe Koliseo to check.
fpThe file pointer to print to.

◆ kls_usageShare()

double kls_usageShare ( KLS_list_element ,
Koliseo *  )

Variable Documentation

◆ kls_reglist_backend_strings

const char* kls_reglist_backend_strings[KLS_REGLIST_TOTAL_BACKENDS]
extern