|
-
February 3rd, 2012, 02:23 PM
#11
Re: Secure Memset
 Originally Posted by laserlight
That's the point: a compiler might not perform the optimisation, but then again it might, so be aware of the possibility if the optimisation is unwanted. It is as simple as that.
If it was that simple, then I wouldn't have started the thread in the first place. Being aware is great, if it is in fact true! But finding a solution is an entirely different matter. Moreover, these kinds of vague and general statements make it difficult to devise a solution. The compiler can't possibly know whether something could be accessed later on in a complex program. There is no way that a compiler should be making that decision based on a few lines of localized code where the memset or fill call is made unless it is a block of data local to a function. Still, the only optimization for something like that that makes any sense to me is to optimize so that the write is as efficient as possible.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|