[PATCH 1/6] malloc: define a maximum malloc size

Sascha Hauer s.hauer at pengutronix.de
Fri Feb 21 04:20:33 PST 2025


On Thu, 20 Feb 2025 21:30:27 +0100, Ahmad Fatoum wrote:
> TLSF and dlmalloc each already enforce a maximum allocation size.
> 
> Let's define SZ_1G as common maximum allocation size in preparation
> for aligning all allocators to observe it.
> 
> The intention is to make code easier to reason about and as extra
> hardening against possible, yet undiscovered, allocator bugs.
> 
> [...]

Applied, thanks!

[1/6] malloc: define a maximum malloc size
      https://git.pengutronix.de/cgit/barebox/commit/?id=6279bd2d3a33 (link may not be stable)
[2/6] tlsf: fail allocations exceeding MALLOC_MAX_SIZE
      https://git.pengutronix.de/cgit/barebox/commit/?id=b5c4d87dfb62 (link may not be stable)
[3/6] dlmalloc: fail allocations exceeding MALLOC_MAX_SIZE
      https://git.pengutronix.de/cgit/barebox/commit/?id=122a8979fefb (link may not be stable)
[4/6] sandbox: libc_malloc: fail allocations exceeding MALLOC_MAX_SIZE
      https://git.pengutronix.de/cgit/barebox/commit/?id=8839004152f7 (link may not be stable)
[5/6] dummy_malloc: fail allocations exceeding MALLOC_MAX_SIZE
      https://git.pengutronix.de/cgit/barebox/commit/?id=8dcd7add5943 (link may not be stable)
[6/6] test: self: malloc: adapt to addition of MALLOC_MAX_SIZE
      https://git.pengutronix.de/cgit/barebox/commit/?id=cb77a6989e59 (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer at pengutronix.de>




More information about the barebox mailing list