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:
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user