Article View: comp.lang.c
Article #2264Re: is a wrapper on memory-allocation calls a good idea?
From: Chris M. Thomasson
Date: Sun, 06 Dec 2026 03:33
Date: Sun, 06 Dec 2026 03:33
59 lines
3996 bytes
3996 bytes
On 12/5/2026 7:28 PM, Chris M. Thomasson wrote: > On 12/5/2026 7:26 PM, Tristan Wibberley wrote: >> On 02/12/2026 17:04, Dan Cross wrote: >>> In article <44jylstwpp.fsf@lowell-ubuntu25.lan>, >>> Lowell Gilbert <lgusenet@be-well.ilk.org> wrote: >>>> Andrey Tarasevich <noone@noone.net> writes: >>>> >>>>> On Mon 11/30/2026 10:31 AM, Lawrence D’Oliveiro wrote: >>>>>> On Sun, 29 Nov 2026 22:44:26 -0800, Andrey Tarasevich wrote: >>>>>>> Well, firstly, overcommit approach simply substitutes "virtual >>>>>>> address space" in place of "actual memory" as the limited resource. >>>>>> No, it is actual memory that is being overcommitted. >>>>> >>>>> Yes, but the whole idea of "overcommiting" simply means that the >>>>> allocator will _reserve_ virtual address space without checking >>>>> whether there is physical storage to back it up. >>>> >>>> and this happens because of the mechanics of (now POSIX) fork(), which >>>> unfortunately was built into the fundament decades ago (long before >>>> POSIX) >>> >>> Not really. Perhaps you're thinking about copy-on-write address >>> spaces vis fork? That doesn't require overcommit; it's >>> perfectly possible both to require and reserve enough available >>> memory to fault the entire writable portion of an address space >>> into existence at `fork`. Historical Unix systems did exactly >>> that. >> >> >> Is this why we used to say Linux systems need some large swap space? >> Because they didn't overcommit there had to be backing available. > > overcommit? Fine. Preload caches all up full, say the whole box is > dedicated to being a single service. Say a proxy server? Its fun, for a proxy, we can preload all sockets up front as pending AcceptEx's! Therefore, we say we can create this many sockets before the box cakes it pants. > >> >> Is it reasonable to say that overcommit just models the same thing as a >> memory bank failing and being hot-removed? Ie, a process /removes/ lots >> of memory banks when it loads the last-straw on mman's back by accessing >> a fresh bit? >> >> Allocation failures used to indicate a useful backing memory >> unavailability but with overcommit they merely indicate an address-space >> segment's unavailability. >> >> That has a problem for interactive uses because indications to the user >> of some readiness threshold are no-longer very stable up to real >> hardware reconfiguration. Old commands all have to be updated to request >> commitment. >> >
Technical Details
Message-ID:
<11f2l2u$3l72j$4@dont-email.me>Path:
mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<11eh538$3fet7$1@dont-email.me> <11ekfeo$mq5n$1@dont-email.me> <11emqek$1rpei$1@dont-email.me> <44jylstwpp.fsf@lowell-ubuntu25.lan> <11epj3c$7k1$1@reader2.panix.com> <11f2kkt$3jjje$2@dont-email.me> <11f2kp4$3l72j$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> Newsgroups: comp.lang.c Subject: Re: is a wrapper on memory-allocation calls a good idea? Date: Sat, 5 Dec 2026 19:33:49 -0800 Organization: A noiseless patient Spider Lines: 59 Message-ID: <11f2l2u$3l72j$4@dont-email.me> References: <11eh538$3fet7$1@dont-email.me> <11ekfeo$mq5n$1@dont-email.me> <11emqek$1rpei$1@dont-email.me> <44jylstwpp.fsf@lowell-ubuntu25.lan> <11epj3c$7k1$1@reader2.panix.com> <11f2kkt$3jjje$2@dont-email.me> <11f2kp4$3l72j$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sun, 06 Dec 2026 03:33:51 +0000 (UTC) Injection-Info: dont-email.me; logging-data="3841107"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18e+xwwgQgdOLAOwKG4a1+PwOLiEw74jt0="; posting-host="abe34923f900c43eeafdd54313a63d31" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:nd0FOn1x3TL0elvSyf+m2Zwc7lc= sha256:w5Yxbk0gHybgZFOvIlpLp+jwtzGDohebeX3RSSyuQTU= sha1:BtDScIfrNqXjLm3+2F3v/zzX06s= sha256:6R59Jmv/hi33erbmshFi+9X8Q+b/hsCg0Le8Pi7HLfg= Content-Language: en-US In-Reply-To: <11f2kp4$3l72j$1@dont-email.me>