Re: A92: BSS + New feature for Fargo?
[Prev][Next][Index][Thread]
Re: A92: BSS + New feature for Fargo?
At 01:22 PM 3/25/98 +0100, Niklas Brunlid wrote:
>Something I just discovered is that the BSS block isn't cleared when
>it's allocated. This can give some hard-to-find bugs if you're not
>careful :( Maybe an idea for the next Fargo, David?
This is quite intentional, and I have no intention of changing it.
Initializing the memory is inefficient if it will be written before being
read anyway. Besides, if it *does* need to be initialized, zero might not
always be the appropriate initialization value to use.
FYI, the same thing must be done for blocks allocated with HeapAlloc. In
fact, Fargo *uses* HeapAlloc to allocate BSS blocks.
---
David Ellsworth
davidell@earthling.net
IRC: eXocomp
ICQ: 2300673
References: