.... I am trying to port some code (a Motif CAD/Grid-generator) from SGI to my SuSE 8.2 Linux box. Everything is coming fairly smoothly (actually DAMN smooth), except for 1 thing. The code is mostly C, with some leaf-FORTRAN. I use malloc/realloc & free to allocate & free mamory. I have found several places where I was calling free repeatedly with the same pointer (slides by on SGI, bombs under Linux) & corrected all of them so far. I have fixed all the simple/silly stuff (I think) & now need to go a bit deeper. I tried activating the documented memory debugging using '#define MALLOC_CHECK_' in my program main, but I get no diagnostics or core dump, just execution which gets to a specific line & hangs. I have also tried the mtrace facility, but just get mention of 3 hex addresses where memory is free'd that wasn't alloc'd. I think I am screwing something else up earlier, but can't get a core dump or any diagnostics to help me out. SGI has a nice & very handy memory debugger (malloc (3X)) which can be compiled in & activated at runtime as needed, ignored otherwise. I haven't found any such thing (yet) under Linux. My question is how do I get Linux to either dump core or give me some diagnostics (at every call to malloc or free, like SGI ;-) ) so I can find my more subtle screwups & fix them ? TIA
William A. Mahaffey III wrote:
---------------< snip >-----------------< question is how do I get Linux to either dump core or give me some diagnostics (at every call to malloc or free, like SGI ;-) ) so I can find my more subtle screwups & fix them ? TIA
I see that you have lots of responses about alternate tools; on the question of core files, I just thought I would mention that my (default) install of SuSE 8.2 sets 'ulimit -Sc 0' in the system-wide /etc/profile file, which prevents core dumps. Don't know enough about ulimit to know if this blocks core-dumping in all cases, but it may have some bearing on your case. FWIW...
Michael G. Henders wrote:
William A. Mahaffey III wrote:
---------------< snip >-----------------<
question is how do I get Linux to either dump core or give me some diagnostics (at every call to malloc or free, like SGI ;-) ) so I can find my more subtle screwups & fix them ? TIA
I see that you have lots of responses about alternate tools; on the question of core files, I just thought I would mention that my (default) install of SuSE 8.2 sets 'ulimit -Sc 0' in the system-wide /etc/profile file, which prevents core dumps. Don't know enough about ulimit to know if this blocks core-dumping in all cases, but it may have some bearing on your case. FWIW...
Yep, I had that problem also, but fixed it. Thanks :-)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
On Tue, 30 Nov 2004, William A. Mahaffey III wrote:
.... I am trying to port some code (a Motif CAD/Grid-generator) from SGI to my SuSE 8.2 Linux box. Everything is coming fairly smoothly (actually DAMN smooth), except for 1 thing. The code is mostly C, with some leaf-FORTRAN. I use malloc/realloc & free to allocate & free mamory. I have found several places where I was calling free repeatedly with the same pointer (slides by on SGI, bombs under Linux) & corrected all of them so far. I have fixed all the simple/silly stuff (I think) & now need to go a bit deeper. I tried activating the documented memory debugging using '#define MALLOC_CHECK_' in my program main, but I get no diagnostics or core dump, just execution which gets to a specific line & hangs. I have also tried the mtrace facility, but just get mention of 3 hex addresses where memory is free'd that wasn't alloc'd. I think I am screwing something else up earlier, but can't get a core dump or any diagnostics to help me out. SGI has a nice & very handy memory debugger (malloc (3X)) which can be compiled in & activated at runtime as needed, ignored otherwise. I haven't found any such thing (yet) under Linux. My question is how do I get Linux to either dump core or give me some diagnostics (at every call to malloc or free, like SGI ;-) ) so I can find my more subtle screwups & fix them ? TIA
Take a look at Valgrind: http://valgrind.kde.org/
Bye, LenZ - -- - ------------------------------------------------------------------ Lenz Grimmer lenz@grimmer.com -o) [ICQ: 160767607 | Jabber: LenZGr@jabber.org] /\ http://www.lenzg.org/ V_V
Hi,
I am currently learning Qt and have written an application using QDialog which I set to be a fixed size, because I now want to include a menubar and toolbar I have changed to using QMainWindow but I now have the problem that the Application is resizable even though I have set the 'sizePolicy' to 'fixed' within Qt Designer as well as setting up the 'minimumSize' and 'maximumSize' properties to be the same.
What am I doing wrong or not setting up properly?
I am using Suse 9.1 and the tools that it comes with.
Regards
Kirk
Try setting sizepolicy to preffered
B-)
On Thursday 02 December 2004 01:31 pm, Kirk Garvey wrote:
Hi,
I am currently learning Qt and have written an application using QDialog which I set to be a fixed size, because I now want to include a menubar and toolbar I have changed to using QMainWindow but I now have the problem that the Application is resizable even though I have set the 'sizePolicy' to 'fixed' within Qt Designer as well as setting up the 'minimumSize' and 'maximumSize' properties to be the same.
What am I doing wrong or not setting up properly?
I am using Suse 9.1 and the tools that it comes with.
Regards
Kirk
programming@lists.opensuse.org