delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/12/19:31:19

From: "J. Hormuzdiar" <jimh AT pantheon DOT yale DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Large arrays eating disk space
Date: Sun, 12 Oct 1997 12:54:17 -0400
Organization: Yale University
Lines: 23
Message-ID: <Pine.GSO.3.94.971012124635.6579A-100000@minerva.cis.yale.edu>
NNTP-Posting-Host: minerva.cis.yale.edu
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hello-
	Perhaps this question is better intended for comp.lang.c, but I am
not sure yet.

	I am using a djgpp/rhide environment with a program that has some
huge fixed size arrays.  When I compile I get an executable that is
correspondingly huge (many meg's), even though the code is pretty small.
I assume that the compiler is saving the whole huge blank pre-used array
in the executable, and I wish it wouldn't.  The space is a problem, but
even worse is the wait for the compiler to save the huge thing every time.

	I could just dynamically allocate using malloc, but I seem to
remember that there is a keyword or option that will automatically do it
for me.  Perhaps I could just add a word to the declaration-

(word) float x[7000][7000];

	Thanks for your help.

						-Jim


- Raw text -


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