delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/12/18/16:15:35

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Message-ID: <3FE213CB.6050903@phekda.gotadsl.co.uk>
Date: Thu, 18 Dec 2003 20:53:31 +0000
From: Richard Dawe <ng AT phekda DOT gotadsl DOT co DOT uk>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031031
X-Accept-Language: en, de, fr
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: allocate memory
References: <brpjb5$2nq$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <20031218074852 DOT 21755 DOT 00000680 AT mb-m26 DOT aol DOT com>
In-Reply-To: <20031218074852.21755.00000680@mb-m26.aol.com>
Lines: 16
NNTP-Posting-Host: 81.6.240.4
X-Trace: 1071781816 mercury.nildram.net 36689 81.6.240.4
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hello.

Sterten wrote:
[snip]
> int array[big];
> ...
> for(i=0;i<=big;i++)array[i]=0;
> 
> and it's down to 80K from 4M  !

Why not zero it using memset?

     memset(array, 0, sizeof(array));

Regards, Rich

- Raw text -


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