Re: C local auto-initialized?
Re: C local auto-initialized?
- Subject: Re: C local auto-initialized?
- From: Scott Ribe <email@hidden>
- Date: Thu, 20 Sep 2007 15:36:24 -0600
- Thread-topic: C local auto-initialized?
Remember that when blocks are first allocated into your address space by the
VM system, they are zero'd as a security measure to prevent data from
leaking across process boundaries. This is not an uncommon scenario: a
variable that ought to be initialized to 0 isn't, and in light testing it's
always 0, but in use where the application is run for a long time it
eventually starts to get non-zero values. Not so much values on the stack
because the stack occupies memory that tends to get overwritten often, but
I've seen this in member variables. Like, uh, a couple of weeks ago ;-)
--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden