1
0
mirror of https://github.com/adtools/clib2.git synced 2025-12-08 14:59:05 +00:00

Maximum slab size limited, debug mode errors fixed

The maximum slab size is now 2^17 bytes (= 131072). If you request a slab size larger than this, you will get slab sizes of 131072 bytes instead.

Enabling the memory management debugging code no longer produces compiler errors.
This commit is contained in:
Olaf Barthel
2016-11-21 12:27:40 +01:00
parent 799ee705e8
commit 7e201fea06
19 changed files with 90 additions and 73 deletions

View File

@ -55,7 +55,7 @@ __get_slab_usage(__slab_usage_callback callback)
__memory_lock();
sui.sui_slab_size = __slab_data.sd_MaxSlabSize;
sui.sui_slab_size = __slab_data.sd_StandardSlabSize;
sui.sui_num_single_allocations = __slab_data.sd_NumSingleAllocations;
sui.sui_total_single_allocation_size = __slab_data.sd_TotalSingleAllocationSize;
@ -72,7 +72,7 @@ __get_slab_usage(__slab_usage_callback callback)
sui.sui_num_slabs++;
sui.sui_total_slab_allocation_size += sizeof(*sn) + __slab_data.sd_MaxSlabSize;
sui.sui_total_slab_allocation_size += sizeof(*sn) + __slab_data.sd_StandardSlabSize;
}
}