This is the back port of the improvement from the 0.7 development branch.
Adding the macro neither breaks API nor ABI.
Historically the step was always 3.
I found, over time, that increasing the step greatly to something like 128 could greatly reduce memory consumption and performance in many cases.
In the situation where a large number of small objects are allocated then this number like 128 becomes highly abusive.
The simple low allocation step will only allocate a single unit on the very first allocation.
If the next allocation is on an array that has a size greater than one and less than four (via the tiny define), then the step size is set to four during allocation.
If the next allocation is on an array that has a size greater than four and less than eight (via the small define), then the step size is set to eight during allocation.
If the next allocation is on an array that has a size greater than eight and less than sixty-four (via the large define), then the step size is set to sixty-four during allocation.
In all cases, if the request step is less than the calculated step, then the requested step is used.
For example, if the requested step is twelve, then after eight is allocation, then the next generated step size is twelve rather than sixty-four.
Using some test files, shows the following reduction:
- Old: ~8GB of RAM -> New: ~200MB of RAM.
- Old: ~500MB of RAM -> New: ~20MB of RAM.
//#define _di_f_memory_default_allocation_step_
#define _di_f_memory_delete_
#define _di_f_memory_destroy_
+//#define _di_f_memory_increase_step_d_
#define _di_f_memory_new_
#define _di_f_memory_new_aligned_
//#define _di_f_memory_resize_
//#define _di_f_memory_default_allocation_step_
//#define _di_f_memory_delete_
#define _di_f_memory_destroy_
+//#define _di_f_memory_increase_step_d_
//#define _di_f_memory_new_
#define _di_f_memory_new_aligned_
//#define _di_f_memory_resize_
//#define _di_f_memory_default_allocation_step_
//#define _di_f_memory_delete_
#define _di_f_memory_destroy_
+//#define _di_f_memory_increase_step_d_
#define _di_f_memory_new_
#define _di_f_memory_new_aligned_
//#define _di_f_memory_resize_
//#define _di_f_memory_default_allocation_step_
//#define _di_f_memory_delete_
#define _di_f_memory_destroy_
+//#define _di_f_memory_increase_step_d_
#define _di_f_memory_new_
#define _di_f_memory_new_aligned_
//#define _di_f_memory_resize_
//#define _di_f_memory_default_allocation_step_
//#define _di_f_memory_delete_
#define _di_f_memory_destroy_
+//#define _di_f_memory_increase_step_d_
#define _di_f_memory_new_
#define _di_f_memory_new_aligned_
//#define _di_f_memory_resize_
//#define _di_f_memory_default_allocation_step_
//#define _di_f_memory_delete_
#define _di_f_memory_destroy_
+//#define _di_f_memory_increase_step_d_
#define _di_f_memory_new_
#define _di_f_memory_new_aligned_
//#define _di_f_memory_resize_
//#define _di_f_memory_default_allocation_step_
//#define _di_f_memory_delete_
#define _di_f_memory_destroy_
+//#define _di_f_memory_increase_step_d_
#define _di_f_memory_new_
#define _di_f_memory_new_aligned_
//#define _di_f_memory_resize_
//#define _di_f_memory_default_allocation_step_
//#define _di_f_memory_delete_
#define _di_f_memory_destroy_
+//#define _di_f_memory_increase_step_d_
#define _di_f_memory_new_
#define _di_f_memory_new_aligned_
//#define _di_f_memory_resize_
//#define _di_f_memory_default_allocation_step_
//#define _di_f_memory_delete_
#define _di_f_memory_destroy_
+//#define _di_f_memory_increase_step_d_
#define _di_f_memory_new_
#define _di_f_memory_new_aligned_
//#define _di_f_memory_resize_
//#define _di_f_memory_default_allocation_step_
//#define _di_f_memory_delete_
#define _di_f_memory_destroy_
+//#define _di_f_memory_increase_step_d_
#define _di_f_memory_new_
#define _di_f_memory_new_aligned_
//#define _di_f_memory_resize_
//#define _di_f_memory_default_allocation_step_
//#define _di_f_memory_delete_
#define _di_f_memory_destroy_
+//#define _di_f_memory_increase_step_d_
#define _di_f_memory_new_
#define _di_f_memory_new_aligned_
//#define _di_f_memory_resize_
//#define _di_f_memory_default_allocation_step_
//#define _di_f_memory_delete_
#define _di_f_memory_destroy_
+//#define _di_f_memory_increase_step_d_
#define _di_f_memory_new_
#define _di_f_memory_new_aligned_
//#define _di_f_memory_resize_
//#define _di_f_memory_default_allocation_step_
#define _di_f_memory_delete_
#define _di_f_memory_destroy_
+//#define _di_f_memory_increase_step_d_
#define _di_f_memory_new_
#define _di_f_memory_new_aligned_
//#define _di_f_memory_resize_
//#define _di_f_memory_default_allocation_step_
//#define _di_f_memory_delete_
#define _di_f_memory_destroy_
+//#define _di_f_memory_increase_step_d_
#define _di_f_memory_new_
#define _di_f_memory_new_aligned_
//#define _di_f_memory_resize_
//#define _di_f_memory_default_allocation_step_
//#define _di_f_memory_delete_
#define _di_f_memory_destroy_
+//#define _di_f_memory_increase_step_d_
#define _di_f_memory_new_
#define _di_f_memory_new_aligned_
//#define _di_f_memory_resize_
//#define _di_f_memory_default_allocation_step_
#define _di_f_memory_delete_
#define _di_f_memory_destroy_
+//#define _di_f_memory_increase_step_d_
#define _di_f_memory_new_
#define _di_f_memory_new_aligned_
//#define _di_f_memory_resize_
//#define _di_f_memory_default_allocation_step_
#define _di_f_memory_delete_
#define _di_f_memory_destroy_
+//#define _di_f_memory_increase_step_d_
#define _di_f_memory_new_
#define _di_f_memory_new_aligned_
//#define _di_f_memory_resize_
//#define _di_f_memory_default_allocation_step_
#define _di_f_memory_delete_
#define _di_f_memory_destroy_
+//#define _di_f_memory_increase_step_d_
#define _di_f_memory_new_
#define _di_f_memory_new_aligned_
//#define _di_f_memory_resize_
//#define _di_f_memory_default_allocation_step_
#define _di_f_memory_delete_
#define _di_f_memory_destroy_
+//#define _di_f_memory_increase_step_d_
#define _di_f_memory_new_
#define _di_f_memory_new_aligned_
//#define _di_f_memory_resize_
//#define _di_f_memory_default_allocation_step_
#define _di_f_memory_delete_
#define _di_f_memory_destroy_
+//#define _di_f_memory_increase_step_d_
#define _di_f_memory_new_
#define _di_f_memory_new_aligned_
//#define _di_f_memory_resize_
#endif // _di_level_0_parameter_checking_
if (step && named->objects.used + 1 > named->objects.size) {
- f_array_length_t size = named->objects.used + step;
+ f_array_length_t size = named->objects.used + macro_f_memory_increase_step_4(step, named->objects.size);
if (size > F_array_length_t_size_d) {
if (named->objects.used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && nameds->used + 1 > nameds->size) {
- f_array_length_t size = nameds->used + step;
+ f_array_length_t size = nameds->used + macro_f_memory_increase_step_4(step, nameds->size);
if (size > F_array_length_t_size_d) {
if (nameds->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && items->used + 1 > items->size) {
- f_array_length_t size = items->used + step;
+ f_array_length_t size = items->used + macro_f_memory_increase_step_4(step, items->size);
if (size > F_array_length_t_size_d) {
if (items->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && nest->used + 1 > nest->size) {
- f_array_length_t size = nest->used + step;
+ f_array_length_t size = nest->used + macro_f_memory_increase_step_4(step, nest->size);
if (size > F_array_length_t_size_d) {
if (nest->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && nests->used + 1 > nests->size) {
- f_array_length_t size = nests->used + step;
+ f_array_length_t size = nests->used + macro_f_memory_increase_step_4(step, nests->size);
if (size > F_array_length_t_size_d) {
if (nests->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && set->objects.used + 1 > set->objects.size) {
- f_array_length_t size = set->objects.used + step;
+ f_array_length_t size = set->objects.used + macro_f_memory_increase_step_4(step, set->objects.size);
if (size > F_array_length_t_size_d) {
if (set->objects.used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && set_quote->objects.used + 1 > set_quote->objects.size) {
- f_array_length_t size = set_quote->objects.used + step;
+ f_array_length_t size = set_quote->objects.used + macro_f_memory_increase_step_4(step, set_quote->objects.size);
if (size > F_array_length_t_size_d) {
if (set_quote->objects.used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && set_quotes->used + 1 > set_quotes->size) {
- f_array_length_t size = set_quotes->used + step;
+ f_array_length_t size = set_quotes->used + macro_f_memory_increase_step_4(step, set_quotes->size);
if (size > F_array_length_t_size_d) {
if (set_quotes->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && sets->used + 1 > sets->size) {
- f_array_length_t size = sets->used + step;
+ f_array_length_t size = sets->used + macro_f_memory_increase_step_4(step, sets->size);
if (size > F_array_length_t_size_d) {
if (sets->used + 1 > F_array_length_t_size_d) {
#ifndef _di_f_memory_default_allocation_step_
#define F_memory_default_allocation_large_d 64
#define F_memory_default_allocation_small_d 8
+ #define F_memory_default_allocation_tiny_d 4
#endif // _di_f_memory_default_allocation_step_
/**
+ * Helper macros for conditionally determining how much memory to allocate for a given step.
+ *
+ * For each macro:
+ * - step: Represents the amount to increase past the helper amount.
+ * - size: Represents the amount already allocated.
+ *
+ * macro_f_memory_increase_*:
+ * - 1: If size is 0, then allocate 1, otherwise allocate step.
+ * - 2: As step 1, plus if size is 1, then allocate tiny, otherwise allocate step.
+ * - 3: As step 2, plus if size is less than small, then allocate small, otherwise allocate step.
+ * - 4: As step 3, plus if size is less than large, then allocate large, otherwise allocate step.
+ */
+#ifndef _di_f_memory_increase_step_d_
+ #define macro_f_memory_increase_step_1(step, size) (size \
+ ? step \
+ : 1 \
+ )
+
+ #define macro_f_memory_increase_step_2(step, size) (size \
+ ? size == 1 \
+ ? step < F_memory_default_allocation_tiny_d ? step : F_memory_default_allocation_tiny_d \
+ : step \
+ : 1 \
+ )
+
+ #define macro_f_memory_increase_step_3(step, size) (size \
+ ? size == 1 \
+ ? step < F_memory_default_allocation_tiny_d ? step : F_memory_default_allocation_tiny_d \
+ : size < F_memory_default_allocation_small_d \
+ ? step < F_memory_default_allocation_small_d ? step : F_memory_default_allocation_small_d \
+ : step \
+ : 1 \
+ )
+
+ #define macro_f_memory_increase_step_4(step, size) (size \
+ ? size == 1 \
+ ? step < F_memory_default_allocation_tiny_d ? step : F_memory_default_allocation_tiny_d \
+ : size < F_memory_default_allocation_small_d \
+ ? step < F_memory_default_allocation_small_d ? step : F_memory_default_allocation_small_d \
+ : size < F_memory_default_allocation_large_d \
+ ? step < F_memory_default_allocation_large_d ? step : F_memory_default_allocation_large_d \
+ : step \
+ : 1 \
+ )
+#endif // _di_f_memory_increase_step_d_
+
+/**
* Reset a generic memory stucture to 0 (clear all values).
*
* This does not deallocate memory, be certain that memory is not allocated before calling this to avoid potential memory leaks.
#endif // _di_level_0_parameter_checking_
if (step && dynamic->used + 1 > dynamic->size) {
- f_array_length_t size = dynamic->used + step;
+ f_array_length_t size = dynamic->used + macro_f_memory_increase_step_4(step, dynamic->size);
if (size > F_string_t_size_d) {
if (dynamic->used + 1 > F_string_t_size_d) {
if (!step) return F_data_not;
if (dynamics->used + 1 > dynamics->size) {
- f_array_length_t size = dynamics->used + step;
+ f_array_length_t size = dynamics->used + macro_f_memory_increase_step_4(step, dynamics->size);
if (size > F_array_length_t_size_d) {
if (dynamics->used + 1 > F_array_length_t_size_d) {
if (!step) return F_data_not;
if (dynamicss->used + 1 > dynamicss->size) {
- f_array_length_t size = dynamicss->used + step;
+ f_array_length_t size = dynamicss->used + macro_f_memory_increase_step_4(step, dynamicss->size);
if (size > F_array_length_t_size_d) {
if (dynamicss->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && maps->used + 1 > maps->size) {
- f_array_length_t size = maps->used + step;
+ f_array_length_t size = maps->used + macro_f_memory_increase_step_4(step, maps->size);
if (size > F_array_length_t_size_d) {
if (maps->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && mapss->used + 1 > mapss->size) {
- f_array_length_t size = mapss->used + step;
+ f_array_length_t size = mapss->used + macro_f_memory_increase_step_4(step, mapss->size);
if (size > F_array_length_t_size_d) {
if (mapss->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && map_multis->used + 1 > map_multis->size) {
- f_array_length_t size = map_multis->used + step;
+ f_array_length_t size = map_multis->used + macro_f_memory_increase_step_4(step, map_multis->size);
if (size > F_array_length_t_size_d) {
if (map_multis->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && map_multiss->used + 1 > map_multiss->size) {
- f_array_length_t size = map_multiss->used + step;
+ f_array_length_t size = map_multiss->used + macro_f_memory_increase_step_4(step, map_multiss->size);
if (size > F_array_length_t_size_d) {
if (map_multiss->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && quantitys->used + 1 > quantitys->size) {
- f_array_length_t size = quantitys->used + step;
+ f_array_length_t size = quantitys->used + macro_f_memory_increase_step_4(step, quantitys->size);
if (size > F_array_length_t_size_d) {
if (quantitys->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && quantityss->used + 1 > quantityss->size) {
- f_array_length_t size = quantityss->used + step;
+ f_array_length_t size = quantityss->used + macro_f_memory_increase_step_4(step, quantityss->size);
if (size > F_array_length_t_size_d) {
if (quantityss->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && ranges->used + 1 > ranges->size) {
- f_array_length_t size = ranges->used + step;
+ f_array_length_t size = ranges->used + macro_f_memory_increase_step_4(step, ranges->size);
if (size > F_array_length_t_size_d) {
if (ranges->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && rangess->used + 1 > rangess->size) {
- f_array_length_t size = rangess->used + step;
+ f_array_length_t size = rangess->used + macro_f_memory_increase_step_4(step, rangess->size);
if (size > F_array_length_t_size_d) {
if (rangess->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && tripless->used + 1 > tripless->size) {
- f_array_length_t size = tripless->used + step;
+ f_array_length_t size = tripless->used + macro_f_memory_increase_step_4(step, tripless->size);
if (size > F_array_length_t_size_d) {
if (tripless->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && attributes->used + 1 > attributes->size) {
- f_array_length_t size = attributes->used + step;
+ f_array_length_t size = attributes->used + macro_f_memory_increase_step_4(step, attributes->size);
if (size > F_array_length_t_size_d) {
if (attributes->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && barriers->used + 1 > barriers->size) {
- f_array_length_t size = barriers->used + step;
+ f_array_length_t size = barriers->used + macro_f_memory_increase_step_4(step, barriers->size);
if (size > F_array_length_t_size_d) {
if (barriers->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && attributes->used + 1 > attributes->size) {
- f_array_length_t size = attributes->used + step;
+ f_array_length_t size = attributes->used + macro_f_memory_increase_step_4(step, attributes->size);
if (size > F_array_length_t_size_d) {
if (attributes->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && conditions->used + 1 > conditions->size) {
- f_array_length_t size = conditions->used + step;
+ f_array_length_t size = conditions->used + macro_f_memory_increase_step_4(step, conditions->size);
if (size > F_array_length_t_size_d) {
if (conditions->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && attributes->used + 1 > attributes->size) {
- f_array_length_t size = attributes->used + step;
+ f_array_length_t size = attributes->used + macro_f_memory_increase_step_4(step, attributes->size);
if (size > F_array_length_t_size_d) {
if (attributes->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && ids->used + 1 > ids->size) {
- f_array_length_t size = ids->used + step;
+ f_array_length_t size = ids->used + macro_f_memory_increase_step_4(step, ids->size);
if (size > F_array_length_t_size_d) {
if (ids->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && keys->used + 1 > keys->size) {
- f_array_length_t size = keys->used + step;
+ f_array_length_t size = keys->used + macro_f_memory_increase_step_4(step, keys->size);
if (size > F_array_length_t_size_d) {
if (keys->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && locks->used + 1 > locks->size) {
- f_array_length_t size = locks->used + step;
+ f_array_length_t size = locks->used + macro_f_memory_increase_step_4(step, locks->size);
if (size > F_array_length_t_size_d) {
if (locks->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && attributes->used + 1 > attributes->size) {
- f_array_length_t size = attributes->used + step;
+ f_array_length_t size = attributes->used + macro_f_memory_increase_step_4(step, attributes->size);
if (size > F_array_length_t_size_d) {
if (attributes->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && mutexs->used + 1 > mutexs->size) {
- f_array_length_t size = mutexs->used + step;
+ f_array_length_t size = mutexs->used + macro_f_memory_increase_step_4(step, mutexs->size);
if (size > F_array_length_t_size_d) {
if (mutexs->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && attributes->used + 1 > attributes->size) {
- f_array_length_t size = attributes->used + step;
+ f_array_length_t size = attributes->used + macro_f_memory_increase_step_4(step, attributes->size);
if (size > F_array_length_t_size_d) {
if (attributes->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && onces->used + 1 > onces->size) {
- f_array_length_t size = onces->used + step;
+ f_array_length_t size = onces->used + macro_f_memory_increase_step_4(step, onces->size);
if (size > F_array_length_t_size_d) {
if (onces->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && semaphores->used + 1 > semaphores->size) {
- f_array_length_t size = semaphores->used + step;
+ f_array_length_t size = semaphores->used + macro_f_memory_increase_step_4(step, semaphores->size);
if (size > F_array_length_t_size_d) {
if (semaphores->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && sets->used + 1 > sets->size) {
- f_array_length_t size = sets->used + step;
+ f_array_length_t size = sets->used + macro_f_memory_increase_step_4(step, sets->size);
if (size > F_array_length_t_size_d) {
if (sets->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && spins->used + 1 > spins->size) {
- f_array_length_t size = spins->used + step;
+ f_array_length_t size = spins->used + macro_f_memory_increase_step_4(step, spins->size);
if (size > F_array_length_t_size_d) {
if (spins->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && lengths->used + 1 > lengths->size) {
- f_array_length_t size = lengths->used + step;
+ f_array_length_t size = lengths->used + macro_f_memory_increase_step_4(step, lengths->size);
if (size > F_array_length_t_size_d) {
if (lengths->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && lengthss->used + 1 > lengthss->size) {
- f_array_length_t size = lengthss->used + step;
+ f_array_length_t size = lengthss->used + macro_f_memory_increase_step_4(step, lengthss->size);
if (size > F_array_length_t_size_d) {
if (lengthss->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && cells->used + 1 > cells->size) {
- f_array_length_t size = cells->used + step;
+ f_array_length_t size = cells->used + macro_f_memory_increase_step_4(step, cells->size);
if (size > F_array_length_t_size_d) {
if (cells->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && cellss->used + 1 > cellss->size) {
- f_array_length_t size = cellss->used + step;
+ f_array_length_t size = cellss->used + macro_f_memory_increase_step_4(step, cellss->size);
if (size > F_array_length_t_size_d) {
if (cellss->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && ids->used + 1 > ids->size) {
- f_array_length_t size = ids->used + step;
+ f_array_length_t size = ids->used + macro_f_memory_increase_step_4(step, ids->size);
if (size > F_array_length_t_size_d) {
if (ids->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && idss->used + 1 > idss->size) {
- f_array_length_t size = idss->used + step;
+ f_array_length_t size = idss->used + macro_f_memory_increase_step_4(step, idss->size);
if (size > F_array_length_t_size_d) {
if (idss->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && int128s->used + 1 > int128s->size) {
- f_array_length_t size = int128s->used + step;
+ f_array_length_t size = int128s->used + macro_f_memory_increase_step_4(step, int128s->size);
if (size > F_array_length_t_size_d) {
if (int128s->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && int128ss->used + 1 > int128ss->size) {
- f_array_length_t size = int128ss->used + step;
+ f_array_length_t size = int128ss->used + macro_f_memory_increase_step_4(step, int128ss->size);
if (size > F_array_length_t_size_d) {
if (int128ss->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && int16s->used + 1 > int16s->size) {
- f_array_length_t size = int16s->used + step;
+ f_array_length_t size = int16s->used + macro_f_memory_increase_step_4(step, int16s->size);
if (size > F_array_length_t_size_d) {
if (int16s->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && int16ss->used + 1 > int16ss->size) {
- f_array_length_t size = int16ss->used + step;
+ f_array_length_t size = int16ss->used + macro_f_memory_increase_step_4(step, int16ss->size);
if (size > F_array_length_t_size_d) {
if (int16ss->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && int32s->used + 1 > int32s->size) {
- f_array_length_t size = int32s->used + step;
+ f_array_length_t size = int32s->used + macro_f_memory_increase_step_4(step, int32s->size);
if (size > F_array_length_t_size_d) {
if (int32s->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && int32ss->used + 1 > int32ss->size) {
- f_array_length_t size = int32ss->used + step;
+ f_array_length_t size = int32ss->used + macro_f_memory_increase_step_4(step, int32ss->size);
if (size > F_array_length_t_size_d) {
if (int32ss->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && int64s->used + 1 > int64s->size) {
- f_array_length_t size = int64s->used + step;
+ f_array_length_t size = int64s->used + macro_f_memory_increase_step_4(step, int64s->size);
if (size > F_array_length_t_size_d) {
if (int64s->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && int64ss->used + 1 > int64ss->size) {
- f_array_length_t size = int64ss->used + step;
+ f_array_length_t size = int64ss->used + macro_f_memory_increase_step_4(step, int64ss->size);
if (size > F_array_length_t_size_d) {
if (int64ss->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && int8s->used + 1 > int8s->size) {
- f_array_length_t size = int8s->used + step;
+ f_array_length_t size = int8s->used + macro_f_memory_increase_step_4(step, int8s->size);
if (size > F_array_length_t_size_d) {
if (int8s->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && int8ss->used + 1 > int8ss->size) {
- f_array_length_t size = int8ss->used + step;
+ f_array_length_t size = int8ss->used + macro_f_memory_increase_step_4(step, int8ss->size);
if (size > F_array_length_t_size_d) {
if (int8ss->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && states->used + 1 > states->size) {
- f_array_length_t size = states->used + step;
+ f_array_length_t size = states->used + macro_f_memory_increase_step_4(step, states->size);
if (size > F_array_length_t_size_d) {
if (states->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && statess->used + 1 > statess->size) {
- f_array_length_t size = statess->used + step;
+ f_array_length_t size = statess->used + macro_f_memory_increase_step_4(step, statess->size);
if (size > F_array_length_t_size_d) {
if (statess->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && statuss->used + 1 > statuss->size) {
- f_array_length_t size = statuss->used + step;
+ f_array_length_t size = statuss->used + macro_f_memory_increase_step_4(step, statuss->size);
if (size > F_array_length_t_size_d) {
if (statuss->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && statusss->used + 1 > statusss->size) {
- f_array_length_t size = statusss->used + step;
+ f_array_length_t size = statusss->used + macro_f_memory_increase_step_4(step, statusss->size);
if (size > F_array_length_t_size_d) {
if (statusss->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && uint128s->used + 1 > uint128s->size) {
- f_array_length_t size = uint128s->used + step;
+ f_array_length_t size = uint128s->used + macro_f_memory_increase_step_4(step, uint128s->size);
if (size > F_array_length_t_size_d) {
if (uint128s->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && uint128ss->used + 1 > uint128ss->size) {
- f_array_length_t size = uint128ss->used + step;
+ f_array_length_t size = uint128ss->used + macro_f_memory_increase_step_4(step, uint128ss->size);
if (size > F_array_length_t_size_d) {
if (uint128ss->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && uint16s->used + 1 > uint16s->size) {
- f_array_length_t size = uint16s->used + step;
+ f_array_length_t size = uint16s->used + macro_f_memory_increase_step_4(step, uint16s->size);
if (size > F_array_length_t_size_d) {
if (uint16s->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && uint16ss->used + 1 > uint16ss->size) {
- f_array_length_t size = uint16ss->used + step;
+ f_array_length_t size = uint16ss->used + macro_f_memory_increase_step_4(step, uint16ss->size);
if (size > F_array_length_t_size_d) {
if (uint16ss->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && uint32s->used + 1 > uint32s->size) {
- f_array_length_t size = uint32s->used + step;
+ f_array_length_t size = uint32s->used + macro_f_memory_increase_step_4(step, uint32s->size);
if (size > F_array_length_t_size_d) {
if (uint32s->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && uint32ss->used + 1 > uint32ss->size) {
- f_array_length_t size = uint32ss->used + step;
+ f_array_length_t size = uint32ss->used + macro_f_memory_increase_step_4(step, uint32ss->size);
if (size > F_array_length_t_size_d) {
if (uint32ss->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && uint64s->used + 1 > uint64s->size) {
- f_array_length_t size = uint64s->used + step;
+ f_array_length_t size = uint64s->used + macro_f_memory_increase_step_4(step, uint64s->size);
if (size > F_array_length_t_size_d) {
if (uint64s->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && uint64ss->used + 1 > uint64ss->size) {
- f_array_length_t size = uint64ss->used + step;
+ f_array_length_t size = uint64ss->used + macro_f_memory_increase_step_4(step, uint64ss->size);
if (size > F_array_length_t_size_d) {
if (uint64ss->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && uint8s->used + 1 > uint8s->size) {
- f_array_length_t size = uint8s->used + step;
+ f_array_length_t size = uint8s->used + macro_f_memory_increase_step_4(step, uint8s->size);
if (size > F_array_length_t_size_d) {
if (uint8s->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && uint8ss->used + 1 > uint8ss->size) {
- f_array_length_t size = uint8ss->used + step;
+ f_array_length_t size = uint8ss->used + macro_f_memory_increase_step_4(step, uint8ss->size);
if (size > F_array_length_t_size_d) {
if (uint8ss->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && dynamic->used + 1 > dynamic->size) {
- f_array_length_t size = dynamic->used + step;
+ f_array_length_t size = dynamic->used + macro_f_memory_increase_step_4(step, dynamic->size);
if (size > F_string_t_size_d) {
if (dynamic->used + 1 > F_string_t_size_d) {
if (!step) return F_data_not;
if (dynamics->used + 1 > dynamics->size) {
- f_array_length_t size = dynamics->used + step;
+ f_array_length_t size = dynamics->used + macro_f_memory_increase_step_4(step, dynamics->size);
if (size > F_array_length_t_size_d) {
if (dynamics->used + 1 > F_array_length_t_size_d) {
if (!step) return F_data_not;
if (dynamicss->used + 1 > dynamicss->size) {
- f_array_length_t size = dynamicss->used + step;
+ f_array_length_t size = dynamicss->used + macro_f_memory_increase_step_4(step, dynamicss->size);
if (size > F_array_length_t_size_d) {
if (dynamicss->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && maps->used + 1 > maps->size) {
- f_array_length_t size = maps->used + step;
+ f_array_length_t size = maps->used + macro_f_memory_increase_step_4(step, maps->size);
if (size > F_array_length_t_size_d) {
if (maps->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && mapss->used + 1 > mapss->size) {
- f_array_length_t size = mapss->used + step;
+ f_array_length_t size = mapss->used + macro_f_memory_increase_step_4(step, mapss->size);
if (size > F_array_length_t_size_d) {
if (mapss->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && map_multis->used + 1 > map_multis->size) {
- f_array_length_t size = map_multis->used + step;
+ f_array_length_t size = map_multis->used + macro_f_memory_increase_step_4(step, map_multis->size);
if (size > F_array_length_t_size_d) {
if (map_multis->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && map_multiss->used + 1 > map_multiss->size) {
- f_array_length_t size = map_multiss->used + step;
+ f_array_length_t size = map_multiss->used + macro_f_memory_increase_step_4(step, map_multiss->size);
if (size > F_array_length_t_size_d) {
if (map_multiss->used + 1 > F_array_length_t_size_d) {
#endif // _di_level_0_parameter_checking_
if (step && tripless->used + 1 > tripless->size) {
- f_array_length_t size = tripless->used + step;
+ f_array_length_t size = tripless->used + macro_f_memory_increase_step_4(step, tripless->size);
if (size > F_array_length_t_size_d) {
if (tripless->used + 1 > F_array_length_t_size_d) {