From: Kris T. <kri...@gm...> - 2015-08-27 11:44:41
|
Hi Joel Some good news. We seem to have less memory problems as well with this update. And the memberconstantHandlerproblem has indeed disappeared. We’re now running STIR with your latest swig without problems so far. Thanks for keeping at it! Kris From: Joel Andersson [mailto:j.a...@gm...] Sent: 23 June 2015 12:09 To: swi...@li... Subject: [Swig-devel] [MATLAB] Update Hi all, I'm back working on the MATLAB module now. I'm trying to resolve some (for me blocking) low-level issues before moving on to trying to get the unit tests to pass. The first thing I did was to refactor the way persistent memory is handled, i.e. pointer objects in SWIG. The MATLAB proxy classes now no longer holds raw C/C++ pointers or type information directly, but only a reference to an internal memory manager. This should both be safer and have less overhead. I also introduced calls to mexLock/mexUnlock to prevent the wrappers to be deallocated prematurely. For me at least, this resolves the memory issues I've had. From what I can tell, I can exit MATLAB at any time and memory get properly deallocated. But I didn't do extensive testing, so if there are still lingering memory issues, let me know. Here is a link to the corresponding issue: https://github.com/jaeandersson/swig/issues/22. The next thing I was planning to do was to refactor the overloading of MATLAB's subsref and subsasgn (this controls all function calls and access to data members, so it's quite central). The current implementation is not working well and I prefer to make a proper, more efficient and generic reimplementation than trying to debug the current one. Hopefully this will resolve Kris' memberconstantHandler problem. I also need to get multiple modules to work within the next couple of weeks (hard deadline at the end of July). Best regards, Joel -- -- Joel Andersson, PhD Ptge. Busquets 11-13, atico 3 E-08940 Cornella de Llobregat (Barcelona), Spain Home: +34-93-6034011 Mobile: +34-63-4408800 (in Sweden also +46-707-360512) |