🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #2263

Re: is a wrapper on memory-allocation calls a good idea?

#2263
From: Chris M. Thomasson
Date: Sun, 06 Dec 2026 03:28
50 lines
3682 bytes
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?

> 
> 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: <11f2kp4$3l72j$1@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-mail
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>

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:28:35 -0800
Organization: A noiseless patient Spider
Lines: 50
Message-ID: <11f2kp4$3l72j$1@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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 06 Dec 2026 03:28:37 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="3841107"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/5q4EyPX+ktZXHYF/NwW3oTKdR2C+Zj1U="; posting-host="abe34923f900c43eeafdd54313a63d31"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:PAfOxU+B2/zUFOH8cvGNQDiczRo= sha256:AEKLuKOf2op6EHCIMo2z+ARRU7tH/VMuY80tCNBvP+w=
	sha1:B0qWc7r2oZMGSqd231zhWfQcawA= sha256:2U8zobF7rbkgmqTYSd64GdfdqYDfw7XG3qgnwlXjQQg=
Content-Language: en-US
In-Reply-To: <11f2kkt$3jjje$2@dont-email.me>