On 04/26/2018 11:24 AM, Edouard Tisserant wrote: > One more question. Sorry for flooding the list. > > As a workaround to avoid leaking memory, I would like to try this : > > - xeno_stub.so : stub library, linked with bootstrap-pic.o > - 1.so, 2.so, ... n.so : libraries calling alchemy/posix realtime > resources, NOT linked with bootstrap-pic.o > > Process life-cycle would be : > > - process start > > dlopen(xeno_stub.so) > > dlopen(1.so) > dlsym + call 1.so > dlclose(1.so) > ... > dlopen(n.so) > dlsym + call n.so > dlclose(n.so) > > dlclose(xeno_stub.so) > > - process end > > Is that correct to assume that this way, pointers setup while calling > xenomai_init() as a side effect of first dlopen() would stay valid while > other non-bootstrap-pic libraries are loaded and unloaded ?
If by pointer setup, you mean all the init stuff run by the various Xenomai libraries when called on behalf of xenomai_init(), then yes. The bootstrap mechanism should be able to support the lifecycle described above. The init sequence is explained here: http://xenomai.org/2015/05/application-setup-and-init/#Initialization_sequence This document refers to the bootstrap module included in the main executable, but same logic would apply to DSOs which include bootstrap-pic such as xeno_stub.so. -- Philippe. _______________________________________________ Xenomai mailing list Xenomai@xenomai.org https://xenomai.org/mailman/listinfo/xenomai