C struct garbage collection not run frequently enough

There is an option to use standard malloc, calloc, free etc, so I could drop in the jl_malloc in there. Then I would just have to include libjulia and link against it, right?

The RTPSA is initialized entirely in the C code, and the constructors just return pointers to them. C owns all of the memory here. Every operation/function takes in pointers to RTPSA in the C library, so doesn’t it make sense to just have the Julia side handle moving the pointers around properly? If I instead use only the RTPSA struct, then at each RTPSA construction I’d have to do an unsafe_load and each operation a pointer_to_objref for each. And even still, Julia doesn’t know how long the coef array is in RTPSA, which is the most memory intensive array in the struct here.