Deutsch English Français Italiano |
<v5d6m5$1769p$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!feed.opticnetworks.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> Newsgroups: comp.lang.c Subject: Re: realloc() - frequency, conditions, or experiences about relocation? Date: Mon, 24 Jun 2024 18:31:48 -0700 Organization: A noiseless patient Spider Lines: 27 Message-ID: <v5d6m5$1769p$1@dont-email.me> References: <v4ojs8$gvji$1@dont-email.me> <v4ov8h$j2q2$1@raubtier-asyl.eternal-september.org> <v52270$2nli8$1@dont-email.me> <v54jac$3a4p2$1@raubtier-asyl.eternal-september.org> <v5bbd3$rhao$2@dont-email.me> <875xtyu0kk.fsf@nosuchdomain.example.com> <v5bluo$thpd$1@dont-email.me> <v5cbkn$11tla$1@dont-email.me> <QNieO.108090$ED9b.88071@fx11.iad> <87r0cmrpww.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 25 Jun 2024 03:31:49 +0200 (CEST) Injection-Info: dont-email.me; posting-host="a0475ea1831d78ec58c17d06517ed380"; logging-data="1284409"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18CZ4XvHy799ZxGTFP8K4r7l6q2HdnLGPk=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:bDVihlfwqa151mtvzA+7WvkErx8= In-Reply-To: <87r0cmrpww.fsf@nosuchdomain.example.com> Content-Language: en-US Bytes: 2270 On 6/24/2024 2:28 PM, Keith Thompson wrote: > scott@slp53.sl.home (Scott Lurndal) writes: >> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes: > [...] >>> Baby X has bbx_malloc() which is guaranteed never to return NULL, and >>> never to return a pointer to an allocation which cannot be indexed by an >>> int. >> >> What do you mean by 'indexed by an int'? So, what happens if I index >> your allocation with -109235? >> >> Or did you mean to say unsigned (or positive) int less than the >> size of the allocation? > > If I recall correctly, Malcolm hates size_t. I presume that > bbx_malloc() will never allocate more than INT_MAX bytes. > He still has to deal with bbx_malloc failing. Don't like automatically aborting... bbx_malloc(INT_MAX); bbx_malloc(INT_MAX); bbx_malloc(INT_MAX); .... ;^)