Re: Swig memory limit
"Kopp, Dor" <[email protected]> Tue, 22 Dec 2020 10:57:21 +0000
| Newsgroups | gmane.comp.programming.swig |
|---|---|
| Message-ID | <BY5PR16MB31099C731C913714BC2E8BD09EDF0@BY5PR16MB3109.namprd16.prod.outlook.com> |
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 I indeed verified my new swig.exe using CFF Explorer and now also using dumpbin, it is a 64bit executable. I do have more than 2GB (the limit afterwards swig can’t allocate more memory when I checked it using Resource Monitor) on my machine. Even if I’m trying to allocate memory in a loop or having many leaks I’m expecting the process to use more than 2GB unless it is configured as a limit somewhere and that’s what I’m trying to figure out. Unfortunately I cannot share my code for it is not a private project. I do think this a general issue and not a code driven. _______________________________________________ Swig-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/swig-user