foonathan / memory

STL compatible C++ memory allocator library using a new RawAllocator concept that is similar to an Allocator but easier to use and write.

Home Page:https://memory.foonathan.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[foonathan::memory] Allocator foonathan::memory::memory_pool (at 0x559f6319a8) received invalid size/alignment 56, max supported is 48terminate called after throwing an instance of 'foonathan::memory::bad_node_size' what(): allocation node size exceeds supported maximum of allocator

Baren123 opened this issue · comments

The -DFOONATHAN_MEMORY_CONTAINER_NODE_SIZES_IMPL is only applicable to QNX platform and so passing this flag was not effective. The node size info was not used by memory and caused FastDDS to use custom node size implementation. The segfault occurs at line 230 of RTPSReader.cpp for the map<GUID_t, uint16_t> object.

The fix was simple, manually copy container_node_sizes_impl.hpp to src/ under the build directory.

Originally posted by @rushipatel in #103 (comment)

I am faced with the same problem!

hello, I also meet the issue when executed command "./HelloWorldExample publisher" twice. I used container_node_sizes_impl.hpp file generated by executed nodesize_dbg, but this issue still remains. Is it convenient to share your ”container_node_sizes_impl.hpp“ files?

@Baren123 - are you compile the examples of Fast-DDS? in that case - i am contributor of Conan Center and brought the Fast-DDS package to Conan Center Index. We saw that they are using a patched version of a specific commit of this memory lib here. Fast-DDS examples are working for us just when compiling foonathan-memory with FOONATHAN_MEMORY_CHECK_ALLOCATION_SIZE = OFF.
(We currently adapting the package so fast-dds could be used via conan).

The issue is the following: to determine the node sizes, memory runs a tool that generates the header. This header is then only usable on the platform where the tool has been run; if you use it with other platforms, you'll get such an error. This is usually fine, except when you're cross compiling.

As I know nothing about cross compiling, I've originally disabled the tool at all during cross compiling. This was then changed by #78 to fix #72 and by #92 to #91. But apparently it remains broken for you.

Can you share the full commands you're using to build the library? On what platform are you doing it? Are you cross-compiling, if so to what platform?

The problem has been solved!Thanks!

The problem has been solved!Thanks!

The problem has been solved!Thanks!

Hello,I have met this problem,How did you solve this problem? Could you please give some advice

This is an issue with Fast-DDS, which will be resolved by the referenced PR.