Re: how to avoid a memset() optimization

"Clayton Weaver" <cgweav@aol.com>
12 Nov 2002 14:08:02 -0500

          From comp.compilers

Related articles
how to avoid a memset() optimization fwai@rsasecurity.com (Francis Wai) (2002-11-07)
Re: how to avoid a memset() optimization lars@bearnip.com (Lars Duening) (2002-11-08)
Re: how to avoid a memset() optimization alexc@world.std.com (Alex Colvin) (2002-11-08)
Re: how to avoid a memset() optimization fjh@cs.mu.OZ.AU (Fergus Henderson) (2002-11-12)
Re: how to avoid a memset() optimization christian.bau@freeserve.co.uk (Christian Bau) (2002-11-12)
Re: how to avoid a memset() optimization lars@bearnip.com (Lars Duening) (2002-11-12)
Re: how to avoid a memset() optimization cgweav@aol.com (Clayton Weaver) (2002-11-12)
Re: how to avoid a memset() optimization n2102139816.ch@chch.demon.co.uk (Charles Bryant) (2002-11-13)
Re: how to avoid a memset() optimization dobes@dobesland.com (Dobes Vandermeer) (2002-11-13)
Re: how to avoid a memset() optimization fjh@cs.mu.OZ.AU (Fergus Henderson) (2002-11-13)
Re: how to avoid a memset() optimization jvorbrueggen@mediasec.de (Jan C. =?iso-8859-1?Q?Vorbr=FCggen?=) (2002-11-13)
Re: how to avoid a memset() optimization usenet-1ugeabe@qeng-ho.org (Arthur Chance) (2002-11-13)
Re: how to avoid a memset() optimization cfc@shell01.TheWorld.com (Chris F Clark) (2002-11-15)
[5 later articles]
| List of all articles for this month |

From: "Clayton Weaver" <cgweav@aol.com>
Newsgroups: comp.compilers
Date: 12 Nov 2002 14:08:02 -0500
Organization: AOL http://www.aol.com
References: 02-11-030
Keywords: optimize
Posted-Date: 12 Nov 2002 14:08:02 EST

>int main()
>{
> char key[16];
> strcpy(key, "whatever");
> encrpts(key);
> memset(key, 0, 16);
>}


    if (!memset(key, 0, 16)) {
          return error;
    }


(ie waste a jump; might even be more efficient if it still allows
other optimizations that volatile would prevent).


Regards,


Clayton Weaver
<mailto: cgweav@aol.com>


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.