[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Are there some potential problems if I use a self-defined memory acquirement function instead of realloc(3) in the l_alloc function?
- From: Andrew Gierth <andrew@...>
- Date: Tue, 11 Aug 2020 10:46:39 +0100
>>>>> "Sean" == Sean Conner <sean@conman.org> writes:
Sean> You might never encounter a system where that happens (much like
Sean> you will probably never come across a system with sign-magnitude
Sean> integer arithmetic that the C standard allows),
Systems where realloc() can fail to shrink a block are not rare (as I
pointed out when this topic came up before) - in particular jemalloc,
which is the default malloc on FreeBSD, can fail this way, as can any
system which maintains a distinction between large and small blocks
(which is a fairly common design approach for malloc).
--
Andrew.
- References:
- Are there some potential problems if I use a self-defined memory acquirement function instead of realloc(3) in the l_alloc function?, 孙世龙 sunshilong
- Re: Are there some potential problems if I use a self-defined memory acquirement function instead of realloc(3) in the l_alloc function?, Stefan
- Re: Are there some potential problems if I use a self-defined memory acquirement function instead of realloc(3) in the l_alloc function?, Roberto Ierusalimschy
- Re: Are there some potential problems if I use a self-defined memory acquirement function instead of realloc(3) in the l_alloc function?, Stefan
- Re: Are there some potential problems if I use a self-defined memory acquirement function instead of realloc(3) in the l_alloc function?, Philippe Verdy
- Re: Are there some potential problems if I use a self-defined memory acquirement function instead of realloc(3) in the l_alloc function?, Andrew Gierth
- Re: Are there some potential problems if I use a self-defined memory acquirement function instead of realloc(3) in the l_alloc function?, 孙世龙 sunshilong
- Re: Are there some potential problems if I use a self-defined memory acquirement function instead of realloc(3) in the l_alloc function?, Sean Conner
- Re: Are there some potential problems if I use a self-defined memory acquirement function instead of realloc(3) in the l_alloc function?, 孙世龙 sunshilong
- Re: Are there some potential problems if I use a self-defined memory acquirement function instead of realloc(3) in the l_alloc function?, Sean Conner