Re: Swig memory limit
William S Fulton <[email protected]> Tue, 22 Dec 2020 08:54:44 +0000
| Newsgroups | gmane.comp.programming.swig |
|---|---|
| Message-ID | <CANGqftBMOgHfbV=awPkCDcr04GQTwxBu7icyS3jMSjL-PkEYbQ@mail.gmail.com> |
On Mon, 21 Dec 2020 at 14:21, Kopp, Dor <[email protected]> wrote: > I tried to use swig on windows with a large scale interface and after long > time of processing I got: > > Assertion failed! > > > > Program: D:\Kopp\11.7\swigwin-4.0.2\swig.exe > > File: DOH/string.c, Line 520 > > > > Expression: tc > > > > Which point that DohRealloc() returns null. I checked the process’s > memory using Resource Monitor and found that the issue occurs after > consuming around 2G. I though that this is happening because swig is a > 32bit executable but I got the same behavior when using a 64bit executable > that I compiled by myself. > > What can I do in order to overcome this limitation? > > > Can you verify that your newly compiled binary really is a 64bit executable using dumpbin. Otherwise, it sounds like you have genuinely run out of memory, so try a machine with more memory. I suppose there is a possibility that swig is stuck in some sort of loop that keeps allocating memory. Swig does have memory leaks, but in most use cases this is not a problem. Debugging with your code as input would be the next step. If you can post the output of swig -E somewhere the problem should be recreatable elsewhere. How many lines is the output of swig -E? William _______________________________________________ Swig-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/swig-user