aws / aws-iot-device-sdk-cpp-v2

Next generation AWS IoT Client SDK for C++ using the AWS Common Runtime
Apache License 2.0
183 stars 109 forks source link

Disable custom memory manager (Custom StlAllocator) #382

Open OnlyOneMoreGeek opened 2 years ago

OnlyOneMoreGeek commented 2 years ago

Confirm by changing [ ] to [x] below:

Known Issue

Platform/OS/Device What are you running the sdk on? Linux x86 Describe the question

When using the sdk, the Aws::Crt types that wrap stl containers use custom allocators by default. This disables the castings of the stl to the AWS::crt (e.g. std::string to Aws::Crt:String).

Is there any way to disable these custom allocators?

jmklix commented 2 years ago

I don't think that its possible to disable the custom memory manager for this sdk. Would using user defined conversion functions work for your use case?

github-actions[bot] commented 2 years ago

Greetings! It looks like this issue hasn’t been active in longer than a week. We encourage you to check if this is still an issue in the latest release. Because it has been longer than a week since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or add an upvote to prevent automatic closure, or if the issue is already closed, please feel free to open a new one.

OnlyOneMoreGeek commented 2 years ago

I don't think that its possible to disable the custom memory manager for this sdk. Would using user defined conversion functions work for your use case?

I think the library should provide user-defined conversions for Aws::Crt::String and Aws:_Crt::Vector to those in the STL. I think it is necessary for the library to allow avoiding unnecessary copies. The other alternative should be to completely disable the memory manager as is done in the aws C++ sdk Link

jmklix commented 2 years ago

Thanks for your feedback. This is something that is not currently supported, but I will change this to a feature request. I don't have a timeline for when this might get added, but I encourage you to upvote the initial comment if you would like this added to this sdk.