ACE_TAO icon indicating copy to clipboard operation
ACE_TAO copied to clipboard

Cascaded allocator

Open smithAchang opened this issue 2 years ago • 5 comments

ACE has fixed-size ACE*_Cached_Allocator, but in some case the total n_chunks can't be determined easyly :(

If the ACE framework has the ability to malloc fixed-size chunks 'infinitely' just like ACE_Malloc< ACE_MEM_POOL_1, ACE_LOCK > for mallocing various-size chunks, that will be very useful!

design

  • choose ACE_Dynamic_Cached_Allocator not ACE_Cached_Allocator

ACE_Cached_Allocator provides poor enhancement for the API

  • combinate ACE_Vector<T> to enable the flexibility of allocator hierarchy
  • all allocators forms a hierarchy with the allocator in lower level has 2 * n_chunks(upper level) capacity

Summary by CodeRabbit

  • New Features

    • Introduced an enhanced dynamic memory management system with a hierarchical caching approach to improve performance and reliability.
  • Tests

    • Added a comprehensive test suite to validate the new memory allocation capabilities, ensuring robust error handling and proper resource management.
    • Updated test configurations to integrate these new checks into the regular build process.
    • Included a new test case specifically for the cascaded allocator functionality.

smithAchang avatar Sep 04 '23 12:09 smithAchang

Only read your description, please use std::vector, ACE_Vector is old and we don't want to use that anymore

jwillemsen avatar Sep 04 '23 12:09 jwillemsen

I have fixed these questions,

Have I lefted any unfinished review issues ?

smithAchang avatar Sep 06 '23 11:09 smithAchang

I have fixed these questions,

Have I lefted any unfinished review issues ?

I am busy with other things, review time on github is very limited, you will have to wait until me or someone else has time to do another review, I only did a high level review

jwillemsen avatar Sep 06 '23 11:09 jwillemsen

ok, thx :)

smithAchang avatar Sep 06 '23 12:09 smithAchang