delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/23/01:31:11

From: Oon Lin <Oon DOT Lin AT jcu DOT edu DOT au>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Excessive exe sizes
Date: Sun, 23 Nov 1997 14:30:35 +1000
Organization: University of Queensland
Lines: 24
Message-ID: <3477B16B.41C6@jcu.edu.au>
References: <01bcf777$71921820$56f682c1 AT nicland> <34773A4D DOT 37DE AT nic DOT smsu DOT edu>
NNTP-Posting-Host: cuda.jcu.edu.au
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

> That looks right.  Look at your data:
> 
> struct look_up_table breaks down like this:
>         int line_length = 4 bytes
>         int x[640] = 2560 bytes
>         int y[640] = 2560 bytes
>         ===========================
>         total = 5124 bytes
> 
> look_up_table[480] = 5124 bytes * 480 = 2,459,520 bytes (2.4 megs)
> 
> 2.4 megs + startup code could easily bring the size to 2.7 megs.

Hi ..
I don't understand the above code..

Why would it affect so much the executable code ?

Wouldn't the statement look_up_table[480] tell the OS to allocate 480
MEMORY locations of size struct look_up_table ? Why would this cause the
executable code to be big ?

Thanks !
Kean

- Raw text -


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