Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #107193
| From | Ken Brody <kenbrody@spamcop.net> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Does heap segment of a C program increases in the amount of RAM or is it fixed to a limit? |
| Date | 2017-03-27 14:50 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <obbmop$mfs$1@dont-email.me> (permalink) |
| References | <b89ce929-f3e4-45f5-9043-fed71931846b@googlegroups.com> <ae725c7e-2bb1-09af-d1e7-2b52d2d5f30d@verizon.net> |
On 3/27/2017 11:06 AM, James R. Kuyper wrote: > On 03/27/2017 04:23 AM, acidlategamer@gmail.com wrote: [...] >> 2. When you use calloc instead of malloc, it zeroes out all the memory >> you requested. This is equivalent to using it. > > It's not "equivalent" to using it; it IS using it. Nit: I have seen malloc implementations which allow the user to configure which method of allocation is used. Typically, this is good for debugging purposes. For example, each allocation can be placed in its own MMU segment, allowing buffer overrun/underrun errors to be caught in hardware. In such an implementation, it should be possible for the MMU to allocate an "all-zeros" segment of memory. But, as far as C is concerned, in order to guarantee all zeros, it's "as if" the memory was written to. -- Kenneth Brody
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Does heap segment of a C program increases in the amount of RAM or is it fixed to a limit? acidlategamer@gmail.com - 2017-03-27 01:23 -0700
Re: Does heap segment of a C program increases in the amount of RAM or is it fixed to a limit? "James R. Kuyper" <jameskuyper@verizon.net> - 2017-03-27 11:06 -0400
Re: Does heap segment of a C program increases in the amount of RAM or is it fixed to a limit? Ken Brody <kenbrody@spamcop.net> - 2017-03-27 14:50 -0400
Re: Does heap segment of a C program increases in the amount of RAM or is it fixed to a limit? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-03-27 21:17 +0100
Re: Does heap segment of a C program increases in the amount of RAM or is it fixed to a limit? Robert Wessel <robertwessel2@yahoo.com> - 2017-03-27 19:08 -0500
Re: Does heap segment of a C program increases in the amount of RAM or is it fixed to a limit? scott@slp53.sl.home (Scott Lurndal) - 2017-03-27 15:23 +0000
Re: Does heap segment of a C program increases in the amount of RAM or is it fixed to a limit? "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-03-27 09:57 -0700
Re: Does heap segment of a C program increases in the amount of RAM or is it fixed to a limit? BartC <bc@freeuk.com> - 2017-03-27 18:14 +0100
Re: Does heap segment of a C program increases in the amount of RAM or is it fixed to a limit? gordonb.l1p2g@burditt.org (Gordon Burditt) - 2017-03-27 12:37 -0500
Re: Does heap segment of a C program increases in the amount of RAM or is it fixed to a limit? "James R. Kuyper" <jameskuyper@verizon.net> - 2017-03-27 13:53 -0400
Re: Does heap segment of a C program increases in the amount of RAM or is it fixed to a limit? scott@slp53.sl.home (Scott Lurndal) - 2017-03-27 18:06 +0000
Re: Does heap segment of a C program increases in the amount of RAM or is it fixed to a limit? supercat@casperkitty.com - 2017-03-27 12:29 -0700
Re: Does heap segment of a C program increases in the amount of RAM or is it fixed to a limit? Robert Wessel <robertwessel2@yahoo.com> - 2017-03-27 19:04 -0500
Re: Does heap segment of a C program increases in the amount of RAM or is it fixed to a limit? supercat@casperkitty.com - 2017-03-27 17:31 -0700
Re: Does heap segment of a C program increases in the amount of RAM or is it fixed to a limit? Ian Collins <ian-news@hotmail.com> - 2017-03-28 13:35 +1300
Re: Does heap segment of a C program increases in the amount of RAM or is it fixed to a limit? Ian Collins <ian-news@hotmail.com> - 2017-03-28 13:37 +1300
csiph-web