Article View: comp.lang.c
Article #2075Re: is a wrapper on memory-allocation calls a good idea?
From: Lowell Gilbert
Date: Tue, 01 Dec 2026 23:20
Date: Tue, 01 Dec 2026 23:20
30 lines
2643 bytes
2643 bytes
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) > Virtual address space of the process still needs to be reserved at the > moment of allocation. And virtual address space still gets "used up" > by such allocations. It can eventually run out. That is the point I > was making. In theory, yes. But if it became (even foreseeably) a problem, we would probably build systems with larger address spaces, in which case "properly written" (ahem) C code would automatically use the larger space without any problem. This has, obviously, happened before. Be well. -- Lowell Gilbert, embedded/networking software engineer http://be-well.ilk.org/~lowell/
Technical Details
Message-ID:
<44jylstwpp.fsf@lowell-ubuntu25.lan>Path:
mbox-mo1.pugleaf.net!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> <11ehine$3kr02$1@dont-email.me> <11ej3eh$5ajn$3@dont-email.me> <11ej60c$6bhr$1@dont-email.me> <11ekfeo$mq5n$1@dont-email.me> <11emqek$1rpei$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Lowell Gilbert <lgusenet@be-well.ilk.org> Newsgroups: comp.lang.c Subject: Re: is a wrapper on memory-allocation calls a good idea? Date: Tue, 01 Dec 2026 18:20:02 -0500 Organization: A noiseless patient Spider Lines: 30 Message-ID: <44jylstwpp.fsf@lowell-ubuntu25.lan> References: <11eh538$3fet7$1@dont-email.me> <11ehine$3kr02$1@dont-email.me> <11ej3eh$5ajn$3@dont-email.me> <11ej60c$6bhr$1@dont-email.me> <11ekfeo$mq5n$1@dont-email.me> <11emqek$1rpei$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 01 Dec 2026 23:20:03 +0000 (UTC) Injection-Info: dont-email.me; logging-data="2392224"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ccbQE4Oobn3W7djqhjAkS"; posting-host="53ad3bfdfea41e89f68f9ef07227cacc" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:tGgI0j7mujDqvm/8PL4Dmf6LsiQ= sha1:qU06GfOto3PmRmC5KoKWaaBSjOQ= sha256:Sjbkh7Rcufou/r00StBgEY4OAvwyoeTQOe71XA8hVQI= sha1:emscbogHZqtZl+Z0xU92kmftpL0= sha256:i0lJBmuHvqmQ2U+9mCDe0qlkBooo+gaTHema3ftcjZM=