Open smithAchang opened 1 year ago
Converted to draft as this looks to be in development
For some security reason, the codes has some misspell.
The test case is enriched becuase the bug produced by misspell , Including Cascaded Allocator PR.
The work has completed after yesterday, it can be considered to merge into main repo :)
Please remove the MPC submodule
Please remove the MPC submodule
ok , it's my misoperation
:)
So I use the
ACE_Cascaded_Dynamic_Cached_Allocator
class provided in my previous PR to form a allocator hierarchy with various fixed-size achiving the 'infinite' space ability asACE_Malloc
by a cost of O(1).
Which PR is that? Please add a link.
[...] with various fixed-size achieving the 'infinite' space ability as
ACE_Malloc
by a cost of O(1).
Please explain what the phrase "'infinite' space ability" means.
So I use the
ACE_Cascaded_Dynamic_Cached_Allocator
class provided in my previous PR to form a allocator hierarchy with various fixed-size achiving the 'infinite' space ability asACE_Malloc
by a cost of O(1).Which PR is that? Please add a link.
[...] with various fixed-size achieving the 'infinite' space ability as
ACE_Malloc
by a cost of O(1).Please explain what the phrase "'infinite' space ability" means.
This allocator can assign memory as ACE_Malloc
, can assign various size chunks and assign as many bytes as the OS can permit
ACE_Malloc
memory pool has only one linked list,so when it has a very long list and has various, random chunk size distribution, the cost of its memory management is great.
In our case, the
free
API ofACE_Malloc
has consumed much CPU time.So I use the
ACE_Cascaded_Dynamic_Cached_Allocator
class provided in my previous PR to form a allocator hierarchy with various fixed-size achieving the 'infinite' space ability asACE_Malloc
by a cost of O(1).Main Design
Use size-based allocator to reduce the cost of malloc/free
Decrease
ACE_Cascaded_Dynamic_Cached_Allocator
's initial_n_chunks constructor parameter according to the hierarchy level, but can be adjusted by a thresholdmin_initial_n_chunks
parameterIncrease
ACE_Cascaded_Dynamic_Cached_Allocator
's chunk_size constructor parameter according to the hierarchy level, it will enable bigger chunks can be malloced