Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #59666
| From | Alex <alex@rivadpm.com> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: allot which initialize the alloted space ? |
| Date | 2017-05-21 17:16 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <ofse9k$1du$1@dont-email.me> (permalink) |
| References | <ofrun4$e80$1@dont-email.me> <9dc8fce7-889a-40ca-b57c-382d3569620f@googlegroups.com> <ofsapd$le7$1@dont-email.me> |
On 5/21/2017 16:16, Ron Aaron wrote: > > > On 21/05/2017 18:01, hughaguilar96@gmail.com wrote: > >> I used to have ZALLOT in the novice-package but I realized that it >> is redundant --- there is no case in which I don't want to zero out >> the memory --- so I just renamed it ALLOT ash shown above. > > Really? Why would you zero out the memory if, for instance, you > were going to read from a file into that memory area? Or if you were > going to copy some other data to it? The zeroing takes time. > The only time an OS like Windows gives you memory that's not initialised to zero is memory you've allocated, used and freed yourself (where yourself is anything running in the process) on the heap. It can be requested zeroed by passing HEAP_ZERO_MEMORY to HeapAlloc. VirtualAlloc (the basis of all memory reservation in Windows, including the provision of heaps) always zeroes memory. About the only time you'd need to zero memory is when you're dealing with secure info like passwords, and the app should do that before passing the memory around or freeing it. Not doing so is a security hole. In the future, zeroing persistent memory (persistent stuff faster than flash SSD but slower than DRAM) will be very expensive indeed, and will normally be done by requesting the device to do it, and not programmatically. -- Alex
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
allot which initialize the alloted space ? Andreas Klimas <klimas@w3group.de> - 2017-05-21 13:50 +0200
Re: allot which initialize the alloted space ? Coos Haak <htrofhc@gmail.com> - 2017-05-21 14:13 +0200
Re: allot which initialize the alloted space ? hughaguilar96@gmail.com - 2017-05-21 08:01 -0700
Re: allot which initialize the alloted space ? Ron Aaron <rambamist@gmail.com> - 2017-05-21 18:16 +0300
Re: allot which initialize the alloted space ? hughaguilar96@gmail.com - 2017-05-21 09:02 -0700
Re: allot which initialize the alloted space ? Ron Aaron <rambamist@gmail.com> - 2017-05-21 19:17 +0300
Re: allot which initialize the alloted space ? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-22 11:22 +0000
Re: allot which initialize the alloted space ? hughaguilar96@gmail.com - 2017-05-24 08:03 -0700
Re: allot which initialize the alloted space ? Alex <alex@rivadpm.com> - 2017-05-24 16:58 +0100
Re: allot which initialize the alloted space ? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-22 07:40 +0000
Re: allot which initialize the alloted space ? Mark Wills <markwills1970@gmail.com> - 2017-05-22 08:02 -0700
Re: allot which initialize the alloted space ? "HAA" <someone@microsoft.com> - 2017-05-24 16:40 +1000
Re: allot which initialize the alloted space ? hughaguilar96@gmail.com - 2017-05-22 13:27 -0700
Re: allot which initialize the alloted space ? Alex <alex@rivadpm.com> - 2017-05-21 17:16 +0100
Re: allot which initialize the alloted space ? Ron Aaron <rambamist@gmail.com> - 2017-05-21 19:22 +0300
Re: allot which initialize the alloted space ? Alex <alex@rivadpm.com> - 2017-05-21 18:03 +0100
Re: allot which initialize the alloted space ? albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-05-21 20:46 +0200
Re: allot which initialize the alloted space ? Alex <alex@rivadpm.com> - 2017-05-21 20:34 +0100
Re: allot which initialize the alloted space ? "HAA" <someone@microsoft.com> - 2017-05-24 16:41 +1000
Re: allot which initialize the alloted space ? Julian Fondren <julian.fondren@gmail.com> - 2017-05-21 08:36 -0700
csiph-web