aws/aws-sdk-cpp

[Question] Default MemorySystemInterface?

Closed this issue · 2 comments

How about giving below one as "default" implementation of MemorySystemInterface?
(not in testing-resource directory but in aws/core/...)

https://github.com/awslabs/aws-sdk-cpp/blob/master/testing-resources/source/MemoryTesting.cpp#L80-L222

Thank you for your suggestion!

There is already a good default memory interface for most tasks. If you do not install a memory manager but you have custom_memory_management turned on, then you have the following benefits:

1.) A centralized allocation and deallocation strategy which helps tremendously with dll safety.
2.) STL objects which are now safe to move accross dll boundaries.

Do you need something more than that for the default? I'm guessing that basic tracking may be useful in a debugging scenario on windows. On linux, I would just use valgrind --tool=memcheck.

As a result I think what we have is probably the best bet for the default. If you have a good idea for some memory managers that we can provide customers as an option, I would be very excited for you to write one and make a pull request for us to evaluate adding to the basic offerings.

OK good. I understood the intention. :)