delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/08/14:04:07

Date: Wed, 8 Oct 1997 12:55:46 -0500 (CDT)
From: Andrew Deren <aderen AT eecs DOT uic DOT edu>
To: Herman Geza <hg211 AT hszk DOT bme DOT hu>
cc: DJGPP Levelezesi lista <djgpp AT delorie DOT com>
Subject: Re: Compiler crashes...
In-Reply-To: <Pine.GSO.3.96.971008183212.15061A-100000@ural2>
Message-ID: <Pine.SUN.3.95.971008125452.812A-100000@s6e.eecs.uic.edu>
MIME-Version: 1.0

On Wed, 8 Oct 1997, Herman Geza wrote:

> 	Hi!
> 
> 	My problem is very simple: I wrote a program which converts
> 	bin files to C files. These C programs are perfect, they only
> 	contain an array. If this array is small, about smaller than
> 	100.000 bytes, there is no problem. But, if it's bigger, the
> 	compiler crashes with SIGSEGV. I used the option -v with
> 	gcc, and I realized that the compiler wasn't able to make
> 	the assembly file. A temporary file was made, and this file
> 	contained about half of my array. I used CWSDPMI and I have
> 	enough memory and winchester space. The TMP env was set right.
> 
> 	So, I think everything was right, but the compiler crashed.
> 	Please, HELP me!
> 
> 				Thanx for advance,
> 							Lantic
> 
When you have your array create it dynamically. Use

char *array = (char*)malloc(sizeof(char)*100000);

This will create the same array with 100,000 bytes.

> 


                        ,,,
                       (0 0)
   +-------------oOO----(_)-------------------+
   |                Andrew Deren              |  
   |             aderen AT eecs DOT uic DOT edu          |
   | www.eecs.uic.edu/~aderen/ader/main.html  |
   +-------------------------oOO--------------+
                       || ||
                      ooO Ooo
 


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019