• rmawatson's avatar
    this is allow custom allocator for obj-api structs/tables. (#4520) · 53a89773
    rmawatson authored
    added "native_custom_alloc" attribute to tables/structs, eg.
    
    table parent_table( native_custom_alloc:"custom_alloc_name" ) {
    ...
    }
    
    with a custom allocator defined as
    
    template <typename T> class custom_alloc_name : public std::allocator<T> {
    public:
    
     typedef T*       pointer;
    
     template <class U>
     struct rebind {
      typedef custom_alloc_name<U> other;
     };
    
     pointer allocate(const std::size_t n) {
          return ....;
     }
    
     void deallocate(T* ptr, std::size_t n) {
        ...
     }
    
     custom_alloc_name() throw() {}
     template <class U> custom_alloc_name(const custom_alloc_name<U>&) throw() {}
    };
    };
    53a89773
Name
Last commit
Last update
..
gRPC Loading commit data...
Benchmarks.md Loading commit data...
Building.md Loading commit data...
CONTRIBUTING.md Loading commit data...
CUsage.md Loading commit data...
Compiler.md Loading commit data...
CppUsage.md Loading commit data...
FlatBuffers.md Loading commit data...
FlexBuffers.md Loading commit data...
GoApi.md Loading commit data...
GoApi_generated.txt Loading commit data...
GoUsage.md Loading commit data...
Grammar.md Loading commit data...
Internals.md Loading commit data...
JavaCsharpUsage.md Loading commit data...
JavaScriptUsage.md Loading commit data...
PHPUsage.md Loading commit data...
PythonUsage.md Loading commit data...
README_TO_GENERATE_DOCS.md Loading commit data...
Schemas.md Loading commit data...
Support.md Loading commit data...
Tutorial.md Loading commit data...
WhitePaper.md Loading commit data...
doxyfile Loading commit data...
doxygen_layout.xml Loading commit data...
groups Loading commit data...
style.css Loading commit data...