Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Eric Sosman <esosman@ieee-dot-org.invalid> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Will 'free' return the memory Immediately to the OS ? |
| Date | 2012-05-17 21:05 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <jp4787$tmc$2@dont-email.me> (permalink) |
| References | <joui61$898$1@speranza.aioe.org> <5co7r7hdgsp3ijgohvueekl1h0a40cr3do@4ax.com> <jp1dmr$gen$1@dont-email.me> <i20ar71d8m427086mra7ortps5up3tqa7v@4ax.com> |
On 5/17/2012 9:47 AM, David T. Ashley wrote:
> On Wed, 16 May 2012 18:36:57 -0500, Stephen Sprunk
> <stephen@sprunk.org> wrote:
>
>> On 16-May-12 12:29, David T. Ashley wrote:
>>> No [modern PC] OS is likely to have the capability to hand the run-time
>>> library a chunk of memory smaller than the page size supported by the
>>> memory management hardware. I don't know what this figure is nowadays,
>>> but I'd guess maybe between 256K and 1M.
>>
>> On x86, the page sizes are 4kB (normal) and 2MB/4MB (large), with the
>> latter depending on whether PAE is enabled. Other architectures vary.
>
> I believe you, but I'm somewhat surprised at this figure. Hardware
> memory management is usually a tradeoff between silicon complexity,
> complexity of setting up the hardware by the software, and
> granularity.
>
> I figured with a modern PC having maybe 4G of memory, you might want
> to divide the memory into maybe 1,000 - 10,000 pages, so I would have
> figured page sizes in the range of 512K - 4M. 4K surprises me.
>
> I'm too lazy to look it all up. The x86 world at the low levels has
> an entry cost. Right now I'm in the ARM world.
<off-topic> Consider the silicon cost of things like a TLB, and
the run-time cost of a TLB miss, and realize that a large page size
can reduce both at the same time. Many systems nowadays support several
page sizes simultaneously, just for better TLB use. </off-topic>
--
Eric Sosman
esosman@ieee-dot-org.invalid
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Will 'free' return the memory Immediately to the OS ? Raj Pashwar <raj121190@hotmail.NOSPAM.com> - 2012-05-15 21:34 +0000
Re: Will 'free' return the memory Immediately to the OS ? Ian Collins <ian-news@hotmail.com> - 2012-05-16 09:55 +1200
Re: Will 'free' return the memory Immediately to the OS ? James Kuyper <jameskuyper@verizon.net> - 2012-05-15 18:42 -0400
Re: Will 'free' return the memory Immediately to the OS ? Keith Thompson <kst-u@mib.org> - 2012-05-15 16:49 -0700
Re: Will 'free' return the memory Immediately to the OS ? Ben Pfaff <blp@cs.stanford.edu> - 2012-05-15 16:59 -0700
Re: Will 'free' return the memory Immediately to the OS ? Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-05-15 20:24 -0400
Re: Will 'free' return the memory Immediately to the OS ? David T. Ashley <dashley@gmail.com> - 2012-05-16 13:29 -0400
Re: Will 'free' return the memory Immediately to the OS ? Stephen Sprunk <stephen@sprunk.org> - 2012-05-16 18:36 -0500
Re: Will 'free' return the memory Immediately to the OS ? David T. Ashley <dashley@gmail.com> - 2012-05-17 09:47 -0400
Re: Will 'free' return the memory Immediately to the OS ? Stephen Sprunk <stephen@sprunk.org> - 2012-05-17 11:22 -0500
Re: Will 'free' return the memory Immediately to the OS ? Kaz Kylheku <kaz@kylheku.com> - 2012-05-17 16:54 +0000
Re: Will 'free' return the memory Immediately to the OS ? Stephen Sprunk <stephen@sprunk.org> - 2012-05-18 12:30 -0500
Re: Will 'free' return the memory Immediately to the OS ? Keith Thompson <kst-u@mib.org> - 2012-05-17 14:09 -0700
Re: Will 'free' return the memory Immediately to the OS ? Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-05-17 21:05 -0400
Re: Will 'free' return the memory Immediately to the OS ? Stephen Sprunk <stephen@sprunk.org> - 2012-05-18 17:41 -0500
Re: Will 'free' return the memory Immediately to the OS ? Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-05-18 20:19 -0400
Re: Will 'free' return the memory Immediately to the OS ? Stephen Sprunk <stephen@sprunk.org> - 2012-05-22 15:08 -0500
Re: Will 'free' return the memory Immediately to the OS ? Ben Pfaff <blp@cs.stanford.edu> - 2012-05-22 13:45 -0700
Re: Will 'free' return the memory Immediately to the OS ? Robert Wessel <robertwessel2@yahoo.com> - 2012-05-23 03:02 -0500
Re: Will 'free' return the memory Immediately to the OS ? Robert Miles <milesrf@Usenet-News.net> - 2012-06-24 23:49 -0500
Re: Will 'free' return the memory Immediately to the OS ? Stephen Sprunk <stephen@sprunk.org> - 2012-06-26 10:33 -0500
Re: Will 'free' return the memory Immediately to the OS ? jgk@panix.com (Joe keane) - 2012-05-18 19:44 +0000
Re: Will 'free' return the memory Immediately to the OS ? Stephen Sprunk <stephen@sprunk.org> - 2012-05-18 17:27 -0500
Re: Will 'free' return the memory Immediately to the OS ? jgk@panix.com (Joe keane) - 2012-05-22 21:52 +0000
Re: Will 'free' return the memory Immediately to the OS ? Ian Collins <ian-news@hotmail.com> - 2012-05-23 11:12 +1200
Re: Will 'free' return the memory Immediately to the OS ? Robert Wessel <robertwessel2@yahoo.com> - 2012-05-23 03:15 -0500
Re: Will 'free' return the memory Immediately to the OS ? Robert Wessel <robertwessel2@yahoo.com> - 2012-05-17 11:54 -0500
csiph-web