From: Al Wong Newsgroups: comp.os.msdos.djgpp Subject: Re: Various Questions for DJGPP Date: 4 May 1998 00:18:01 -0700 Organization: Hummingbird Software Lines: 66 Message-ID: <354D6A9B.43EA@primenet.com> References: <354CAFDB DOT 7E76 AT cs DOT com> Reply-To: awong AT primenet DOT com MIME-Version: 1.0 CC: awong AT primenet DOT com Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Thank you to all that have responded to my questions and especially to John Aldrich (fighteer AT cs DOT com). The timeliness of the responses is very much appreciated. I will summarize the answers to my questions below in case other people have similar problems: > In all situations below, I'm using just DOS 6.22 without > Windows 3.11 running. HIMEM and EMM386 loaded. Using SMARTDRV. > > 1) A large C program compiles and links successfully on a > Pentium 133Mhz with 40MB of RAM. The same program also > compiles but FAILS to link on a 486-33Mhz with 8 MB of RAM. > I get a SIGSEGV error. Possible solutions and fixes suggested > in the FAQ doesn't seem relevant to this problem. Does the current This was a DPMI swap file problem. I had thought pointing the TEMPDIR environment variable to an drive partition with lots of free disk space was sufficient. Evidently only DJGPP recognizes this, not CWSDPMI. The problem was CWSDPMI was using the C: drive as default for the swap file. However, my C: had very little free space left. The solution to this problem is to point CWSDPMI (via CWSPARAM) to another drive partition with free space. In my case, the same drive partition where TEMPDIR is pointing. After I did the above, DJGPP was able to compile and link the large program without any problems! I am very happy about this! :) > 2) How does one disable the "Time in ..." messages that the > compiler displays. I'm sure they are valuable for profiling > and optimization but I would just like to see any warning > or error messages without undue scrolling. When I first started to port the program over from Borland to DJGPP, some modules failed to compile with just the message, "there were some errors", leaving me with no clue as to where the error(s) occurred. Searching through the FAQ, I discovered using the -Q switch lets DJGPP list the C functions it processed correctly so that I could locate the problem functions. I didn't realize the -Q switch also lists the "time in ..." messages also. So mystery solved here. > 3) How does one check for "memory leaks". It seems there is no > exact equivalent in DJGPP to coreleft() or farcoreleft(). > I sure would like to know if memory allocations are being > released. Looks like I'll need to make "wrapper" functions to keep track of the memory allocation/deallocations to test for memory leaks. > 4) To get rid of all debugger information, is using the "-s" switch > in the compilation all that is needed? Yes, this is all that is needed. I asked this question because Borland required you to turn off the debugger in two places, in the compiler and in the linker. It seems the linker strips away the debugger information from the object files before the link. Thanks again to all who responded! Cheers, Al