fir pisze:
> Dan Cross pisze:
>> In article <11ej…@dont-email.me>, >> Andrey Tarasevich  <noo…@noone.net> wrote:
>>> On Sun 11/29/2026 10:00 PM, Lawrence D’Oliveiro wrote:
>>>> So you don’t even need to bother to check for memory-allocation >>>> failures, because you will never get a failure status.
>>> >>> Well, firstly, overcommit approach simply substitutes "virtual address >>> space" in place of "actual memory" as the limited resource. And while >>> address space is usually huge, one can still exhaust it if one really >>> sets their mind to it. This can still lead to an allocation failure. >>> [snip]
>> >> And even if we consider virtual memory near-infinite for >> practical purposes, systems usually still impose an artifical >> cap on it in the form of a configurable resource limit; this >> is usually well-below the size of the virtual address space. >> >> I am reminded of some of the programming advice common in the >> after the introduction of virtual memory in Unix with the >> adoption of the 32-bit VAX: "We've got a whole 4 Gigs!  No one >> will ever use all of that, but you should still check the return >> value of `malloc`." >> >>     - Dan C. >>
> yesterday i got a crash related to reallock.. first time in my life > probbaly..it happend i wrote 1 slot after a reallocked memory and > it heppen 'sometimes' though rarely this 1 slot did overvritte > some of its metadata so sometimes - liek really rare something like > few thousand reallocks
maybe it was not even few thousends it was more like after 80x3000 reallocks ;c
> - i got a crash on reallock..thoug everything besides was ok.. so it took me over hour to find it... > > i really rare dil with crashes (as i rarely use pointers though > in 'modern c' i would say (as i myself define it) i m a real heavu user of realloc