koliseo 0.4.9
|
Functions | |
const char * | kls_reglist_backend_string (KLS_RegList_Alloc_Backend kls_be) |
Returns the string corresponding to passed kls_be. | |
KLS_Region_List | kls_rl_emptyList (void) |
bool | kls_rl_empty (KLS_Region_List l) |
KLS_list_element | kls_rl_head (KLS_Region_List l) |
KLS_Region_List | kls_rl_tail (KLS_Region_List l) |
KLS_Region_List | kls_rl_cons (Koliseo *kls, KLS_list_element e, KLS_Region_List l) |
KLS_region_list_item * | kls_list_pop (Koliseo *kls) |
KLS_Region_List | kls_rl_t_cons (Koliseo_Temp *t_kls, KLS_list_element e, KLS_Region_List l) |
void | kls_rl_freeList (KLS_Region_List l) |
Frees all values and nodes for passed Region list. | |
void | kls_rl_showList_toFile (KLS_Region_List l, FILE *fp) |
void | kls_rl_showList (KLS_Region_List l) |
bool | kls_rl_member (KLS_list_element el, KLS_Region_List l) |
int | kls_rl_length (KLS_Region_List l) |
KLS_Region_List | kls_rl_append (Koliseo *kls, KLS_Region_List l1, KLS_Region_List l2) |
KLS_Region_List | kls_rl_reverse (Koliseo *kls, KLS_Region_List l) |
KLS_Region_List | kls_rl_copy (Koliseo *kls, KLS_Region_List l) |
KLS_Region_List | kls_rl_delete (Koliseo *kls, KLS_list_element el, KLS_Region_List l) |
KLS_Region_List | kls_rl_insord (Koliseo *kls, KLS_list_element el, KLS_Region_List l) |
KLS_Region_List | kls_rl_insord_p (Koliseo *kls, KLS_list_element el, KLS_Region_List l) |
bool | kls_rl_isLess (KLS_Region *r1, KLS_Region *r2) |
Compares two regions and returns true if the first one has a smaller size. | |
bool | kls_rl_isEqual (KLS_Region *r1, KLS_Region *r2) |
Compares two regions and returns true if their size is equal. | |
KLS_Region_List | kls_rl_mergeList (Koliseo *kls, KLS_Region_List l1, KLS_Region_List l2) |
KLS_Region_List | kls_rl_intersect (Koliseo *kls, KLS_Region_List l1, KLS_Region_List l2) |
KLS_Region_List | kls_rl_diff (Koliseo *kls, KLS_Region_List l1, KLS_Region_List l2) |
double | kls_usageShare (KLS_Region *r, Koliseo *kls) |
Returns the ratio of memory used by the passed KLS_Region relative to the passed Koliseo as a double. | |
ptrdiff_t | kls_regionSize (KLS_Region *r) |
Return size of a passed KLS_Region. | |
ptrdiff_t | kls_avg_regionSize (Koliseo *kls) |
Return average region size in usage for the passed Koliseo. | |
void | kls_usageReport_toFile (Koliseo *kls, FILE *fp) |
Prints an usage report for the passed Koliseo to the passed file. | |
void | kls_usageReport (Koliseo *kls) |
Print usage report for passed Koliseo to stdout. | |
ptrdiff_t | kls_type_usage (int type, Koliseo *kls) |
Calc memory used by the specific type of KLS_list_element. | |
ptrdiff_t | kls_total_padding (Koliseo *kls) |
Calc memory used as padding for the passed Koliseo. | |
int | kls_get_maxRegions_KLS_BASIC (Koliseo *kls) |
Calcs the max number of possible KLS_PUSH ops when using KLS_BASIC reglist alloc backend. | |
int | kls_temp_get_maxRegions_KLS_BASIC (Koliseo_Temp *t_kls) |
Calcs the max number of possible KLS_PUSH_T ops when using KLS_BASIC reglist alloc backend. | |
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_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_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_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. | |
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) |
Variables | |
const char * | kls_reglist_backend_strings [KLS_REGLIST_TOTAL_BACKENDS] |
Defines strings for KLS_RegList_Alloc_Backend values. |
void KLS_autoregion_on_free | ( | struct Koliseo * | kls | ) |
void KLS_autoregion_on_new | ( | struct Koliseo * | kls | ) |
void KLS_autoregion_on_push | ( | struct Koliseo * | kls, |
ptrdiff_t | padding, | ||
const char * | caller, | ||
void * | user ) |
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_autoregion_on_temp_start | ( | struct Koliseo_Temp * | t_kls | ) |
ptrdiff_t kls_avg_regionSize | ( | Koliseo * | kls | ) |
Return average region size in usage for the passed Koliseo.
kls | The Koliseo to check usage for. |
int kls_get_maxRegions_KLS_BASIC | ( | Koliseo * | kls | ) |
Calcs the max number of possible KLS_PUSH ops when using KLS_BASIC reglist alloc backend.
KLS_region_list_item * kls_list_pop | ( | Koliseo * | kls | ) |
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.
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. |
name | The name to assign to the resulting KLS_Region. |
desc | The desc to assign to the resulting KLS_Region. |
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.
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. |
type | The type index for pushed KLS_Region. |
name | The name to assign to the resulting KLS_Region. |
desc | The desc to assign to the resulting KLS_Region. |
ptrdiff_t kls_regionSize | ( | KLS_Region * | r | ) |
Return size of a passed KLS_Region.
Sugar.
r | The KLS_Region. |
const char * kls_reglist_backend_string | ( | KLS_RegList_Alloc_Backend | kls_be | ) |
Returns the string corresponding to passed kls_be.
KLS_Region_List kls_rl_append | ( | Koliseo * | kls, |
KLS_Region_List | l1, | ||
KLS_Region_List | l2 ) |
KLS_Region_List kls_rl_cons | ( | Koliseo * | kls, |
KLS_list_element | e, | ||
KLS_Region_List | l ) |
KLS_Region_List kls_rl_copy | ( | Koliseo * | kls, |
KLS_Region_List | l ) |
KLS_Region_List kls_rl_delete | ( | Koliseo * | kls, |
KLS_list_element | el, | ||
KLS_Region_List | l ) |
KLS_Region_List kls_rl_diff | ( | Koliseo * | kls, |
KLS_Region_List | l1, | ||
KLS_Region_List | l2 ) |
bool kls_rl_empty | ( | KLS_Region_List | l | ) |
KLS_Region_List kls_rl_emptyList | ( | void | ) |
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.
l | The list to free (allocated by using malloc). |
KLS_list_element kls_rl_head | ( | KLS_Region_List | l | ) |
KLS_Region_List kls_rl_insord | ( | Koliseo * | kls, |
KLS_list_element | el, | ||
KLS_Region_List | l ) |
KLS_Region_List kls_rl_insord_p | ( | Koliseo * | kls, |
KLS_list_element | el, | ||
KLS_Region_List | l ) |
KLS_Region_List kls_rl_intersect | ( | Koliseo * | kls, |
KLS_Region_List | l1, | ||
KLS_Region_List | l2 ) |
bool kls_rl_isEqual | ( | KLS_Region * | r1, |
KLS_Region * | r2 ) |
Compares two regions and returns true if their size is equal.
r1 | The first KLS_Region |
r2 | The second KLS_Region |
bool kls_rl_isLess | ( | KLS_Region * | r1, |
KLS_Region * | r2 ) |
Compares two regions and returns true if the first one has a smaller size.
r1 | The KLS_Region expected to be smaller |
r2 | The KLS_Region expected to be bigger |
int kls_rl_length | ( | KLS_Region_List | l | ) |
bool kls_rl_member | ( | KLS_list_element | el, |
KLS_Region_List | l ) |
KLS_Region_List kls_rl_mergeList | ( | Koliseo * | kls, |
KLS_Region_List | l1, | ||
KLS_Region_List | l2 ) |
KLS_Region_List kls_rl_reverse | ( | Koliseo * | kls, |
KLS_Region_List | l ) |
void kls_rl_showList | ( | KLS_Region_List | l | ) |
void kls_rl_showList_toFile | ( | KLS_Region_List | l, |
FILE * | fp ) |
KLS_Region_List kls_rl_t_cons | ( | Koliseo_Temp * | t_kls, |
KLS_list_element | e, | ||
KLS_Region_List | l ) |
KLS_Region_List kls_rl_tail | ( | KLS_Region_List | l | ) |
int kls_temp_get_maxRegions_KLS_BASIC | ( | Koliseo_Temp * | t_kls | ) |
Calcs the max number of possible KLS_PUSH_T ops when using KLS_BASIC reglist alloc backend.
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.
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. |
name | The name to assign to the resulting KLS_Region. |
desc | The desc to assign to the resulting KLS_Region. |
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.
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. |
type | The type index for pushed KLS_Region. |
name | The name to assign to the resulting KLS_Region. |
desc | The desc to assign to the resulting KLS_Region. |
ptrdiff_t kls_total_padding | ( | Koliseo * | kls | ) |
Calc memory used as padding for the passed Koliseo.
kls | The Koliseo to check total padding for. |
ptrdiff_t kls_type_usage | ( | int | type, |
Koliseo * | kls ) |
Calc memory used by the specific type of KLS_list_element.
type | The integer corresponding to element->type |
kls | The Koliseo to check usage for. |
void kls_usageReport | ( | Koliseo * | kls | ) |
Print usage report for passed Koliseo to stdout.
kls | The Koliseo to print info for. |
void kls_usageReport_toFile | ( | Koliseo * | kls, |
FILE * | fp ) |
Prints an usage report for the passed Koliseo to the passed file.
kls | The Koliseo to check. |
fp | The file pointer to print to. |
double kls_usageShare | ( | KLS_Region * | r, |
Koliseo * | kls ) |
Returns the ratio of memory used by the passed KLS_Region relative to the passed Koliseo as a double.
r | The KLS_Region to check relative size for. |
kls | The Koliseo to check on. |
const char* kls_reglist_backend_strings[KLS_REGLIST_TOTAL_BACKENDS] |
Defines strings for KLS_RegList_Alloc_Backend values.