Sujet : Re: realloc() - frequency, conditions, or experiences about relocation?
De : malcolm.arthur.mclean (at) *nospam* gmail.com (Malcolm McLean)
Groupes : comp.lang.cDate : 25. Jun 2024, 00:22:04
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v5cv2s$15rhq$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10
User-Agent : Mozilla Thunderbird
On 24/06/2024 22:28, 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.
Exactly.
Currently bbx_malloc() does take a size_t, but there version in which it takes an int. However you get warning sif yiub try something like bbx_mallcc(10 * sizeof(int)) on the basis that expressin is size_t.
But if you pass either a negative number or more than iNT_MAX, it assumes the request is invalid and terminates with an error message.
-- Check out my hobby project.http://malcolmmclean.github.io/babyxrc
Date | Sujet | # | | Auteur |
17 Jun 24 | realloc() - frequency, conditions, or experiences about relocation? | 95 | | Janis Papanagnou |
17 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | Chris M. Thomasson |
17 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 53 | | Ben Bacarisse |
17 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 52 | | Malcolm McLean |
17 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 50 | | Ben Bacarisse |
17 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 49 | | Malcolm McLean |
17 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 21 | | Ben Bacarisse |
17 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 17 | | Anton Shepelev |
18 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 16 | | Tim Rentsch |
18 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 8 | | Malcolm McLean |
18 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 5 | | Malcolm McLean |
29 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 4 | | Lawrence D'Oliveiro |
2 Jul 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 3 | | Malcolm McLean |
2 Jul 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | Ben Bacarisse |
4 Jul 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | Lawrence D'Oliveiro |
24 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 2 | | Tim Rentsch |
24 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | David Brown |
20 Jun 24 | Indefinite pronouns [was:Re: realloc() - frequency, conditions, or experiences about relocation?] | 7 | | Anton Shepelev |
20 Jun 24 | Re: Indefinite pronouns | 3 | | vallor |
21 Jun 24 | Re: Indefinite pronouns | 2 | | David Brown |
21 Jun 24 | Re: Indefinite pronouns | 1 | | Keith Thompson |
20 Jun 24 | Re: Indefinite pronouns [was:Re: realloc() - frequency, conditions, or experiences about relocation?] | 2 | | Kenny McCormack |
20 Jun 24 | Re: Indefinite pronouns [was: Re: <something technical>] | 1 | | Janis Papanagnou |
21 Jun 24 | Re: Indefinite pronouns [was:Re: realloc() - frequency, conditions, or experiences about relocation?] | 1 | | Tim Rentsch |
17 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 2 | | Richard Harnden |
17 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | Chris M. Thomasson |
17 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | Malcolm McLean |
17 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 23 | | Anton Shepelev |
18 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | David Jones |
19 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 9 | | David Duffy |
19 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 7 | | Malcolm McLean |
19 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 4 | | Ben Bacarisse |
19 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 3 | | David Brown |
19 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 2 | | Ben Bacarisse |
20 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | David Brown |
20 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 2 | | Anton Shepelev |
8 Jul 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | Anton Shepelev |
19 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | Anton Shepelev |
2 Jul 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 12 | | Rich Ulrich |
2 Jul 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 5 | | Keith Thompson |
2 Jul 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 4 | | Rich Ulrich |
8 Jul 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 3 | | Anton Shepelev |
22 Jul 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 2 | | Rich Ulrich |
23 Jul 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | Anton Shepelev |
2 Jul 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 6 | | Paul |
2 Jul 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 5 | | Rich Ulrich |
2 Jul 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 4 | | Rich Ulrich |
2 Jul 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 3 | | Paul |
2 Jul 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | James Kuyper |
2 Jul 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | James Kuyper |
17 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | Chris M. Thomasson |
18 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 3 | | Keith Thompson |
18 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | Malcolm McLean |
18 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | Bonita Montero |
17 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | David Brown |
17 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 28 | | Bonita Montero |
20 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 27 | | Vir Campestris |
21 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 26 | | Bonita Montero |
24 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 25 | | Lawrence D'Oliveiro |
24 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 21 | | Keith Thompson |
24 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 11 | | David Brown |
24 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 7 | | Malcolm McLean |
24 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 3 | | Keith Thompson |
25 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | Malcolm McLean |
25 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | Chris M. Thomasson |
25 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 3 | | Lawrence D'Oliveiro |
25 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 2 | | Bonita Montero |
26 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | Lawrence D'Oliveiro |
24 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 2 | | Chris M. Thomasson |
24 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | Bonita Montero |
25 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | Lawrence D'Oliveiro |
24 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | Bonita Montero |
25 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 8 | | Lawrence D'Oliveiro |
25 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 6 | | Keith Thompson |
25 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | Richard Damon |
28 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 2 | | Phil Carmody |
28 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | Keith Thompson |
28 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 2 | | James Kuyper |
28 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | Keith Thompson |
28 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | James Kuyper |
24 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 3 | | Bonita Montero |
24 Jun 24 | Down the hall, past the water cooler, third door on the left... (Was: realloc() - frequency, conditions, or experiences about) relocation? | 2 | | Kenny McCormack |
24 Jun 24 | Re: Down the hall, past the water cooler, third door on the left... (Was: realloc() - frequency, conditions, or experiences about) relocation? | 1 | | Bonita Montero |
17 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 2 | | David Brown |
17 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | Bonita Montero |
17 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | Janis Papanagnou |
17 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | Michael S |
18 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | Rosario19 |
25 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 7 | | Bonita Montero |
25 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 4 | | Vir Campestris |
25 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 3 | | Bonita Montero |
26 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 2 | | Vir Campestris |
26 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | Bonita Montero |
25 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 2 | | DFS |
25 Jun 24 | Re: realloc() - frequency, conditions, or experiences about relocation? | 1 | | Bonita Montero |