> Le 20 janv. 2019 à 12:38, Stefan Kersten <s...@k-hornz.de> a écrit : > > Hi Stéphane, > > On 17/01/2019 11:00, Stéphane Letz wrote: >> You can start to experiment looking at this file : >> https://github.com/grame-cncm/faust/blob/master-dev/tools/benchmark/dynamic-jack-gtk.cpp > > Thanks for the pointer! > >> - note that global memory (like when using the « waveform » primitive in the >> DSP code) uses static kind of allocation in the LLVM module. I guess you are >> doing to create DSP factory outside the RT context ? (because in any case it >> can take some time to compile and JIT the Faust DSP…) > > Yes, the factory will be created outside the RT context. > >> - as you have discovered the STL methods used in Factory/DSP. I tried to >> play with the std::allocator concept (see >> https://en.cppreference.com/w/cpp/memory/allocator) hoping to branch one >> using the custom memory manager in the used std::map and std::list data >> structured, but without much success up to now. Do you have experience using >> std::allocator ? > > No, unfortunately not. I played around a little and I get something > compiling (and maybe working ;) using std::map emplace and at, but not > using operator[]: > https://gist.github.com/kaoskorobase/38e15df544dd9b9866dcc2e28191f77c > > Since the memory manager belongs to a single factory would the idea be > to set a global memory manager for the factory table? > > Thanks + best, > Stefan
Could be yes, a global memory manager for the factory table. The factory table is allocated globally in llvm_dsp_aux.cpp And the memory manager associated with a given factory would have to handle the dsp list (this line in your exemple code typedef std::list<dsp*, custom_allocator<dsp*>> dsp_list; ) PR welcome ((-; Stéphane _______________________________________________ Faudiostream-devel mailing list Faudiostream-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/faudiostream-devel