🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #2262

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

#2262
From: Tristan Wibberley
Date: Sun, 06 Dec 2026 03:26
56 lines
4074 bytes
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.

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.

-- 
Tristan Wibberley

The message body is Copyright (C) 2026 Tristan Wibberley except
citations and quotations noted. All Rights Reserved except that you may,
of course, cite it academically giving credit to me, distribute it
verbatim as part of a usenet system or its archives, and use it to
promote my greatness and general superiority without misrepresentation
of my opinions other than my opinion of my greatness and general
superiority which you _may_ misrepresent. You definitely MAY NOT train
any production AI system with it but you may train experimental AI that
will only be used for evaluation of the AI methods it implements.
Technical Details
Message-ID: <11f2kkt$3jjje$2@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>

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: Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk>
Newsgroups: comp.lang.c
Subject: Re: is a wrapper on memory-allocation calls a good idea?
Date: Sun, 6 Dec 2026 03:26:20 +0000
Organization: A noiseless patient Spider
Lines: 56
Message-ID: <11f2kkt$3jjje$2@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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 06 Dec 2026 03:26:21 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="3788398"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/5t5D10umAgbwr6OBoGw567PfC1r+d7RXNuyL1bDD33Q=="; posting-host="dcb879cf630529286ffe07c4eb0b98ca"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:J/Sy0cYC6eOiOMSo4FdFT//drC4= sha256:hpIDLr+NGMwYmZ/Z8a5kZeMdzQ3JotsWiYKoq6/Rn7g=
	sha1:11uS8XvVJODSIKsHDgN/FlBhliA= sha256:eyR2jy9gch0k2A0HrOYRDVsuSXmvJn3Mrx9bpLuGcwo=
In-Reply-To: <11epj3c$7k1$1@reader2.panix.com>
Content-Language: en-GB