Page MenuHomeFreeBSD

loader: Simplify build a little
ClosedPublic

Authored by imp on Feb 15 2024, 12:07 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 21, 12:48 PM
Unknown Object (File)
Mon, Oct 21, 12:33 PM
Unknown Object (File)
Fri, Oct 18, 9:59 AM
Unknown Object (File)
Sep 20 2024, 7:45 AM
Unknown Object (File)
Sep 19 2024, 12:37 PM
Unknown Object (File)
Sep 16 2024, 10:29 PM
Unknown Object (File)
Sep 7 2024, 5:32 AM
Unknown Object (File)
Sep 4 2024, 4:53 AM
Subscribers

Details

Summary

Confine -DDISK_DEBUG to biosdisc.c, the only file it affects.
Use modern variable arrays instead of alloca and add a sanity
size minimum for biospnp nodes. These nodes are tiny enough that
we needn't do a malloc/free pair: the stack is fine.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

alloca or local variable does allocate from stack (which may be in collision with bss), the opther option there to get low memory allocation is to use bio_alloc() and bio_free().

This revision is now accepted and ready to land.Feb 15 2024, 8:21 AM

alloca or local variable does allocate from stack (which may be in collision with bss), the opther option there to get low memory allocation is to use bio_alloc() and bio_free().

Pnp nodes are like 32 bytes... and must be in the lower MB.

In D43914#1001826, @imp wrote:

alloca or local variable does allocate from stack (which may be in collision with bss), the opther option there to get low memory allocation is to use bio_alloc() and bio_free().

Pnp nodes are like 32 bytes... and must be in the lower MB.

Yep, same for bio_alloc - we currently do use it for disk io bounce buffer allocations.

This revision was automatically updated to reflect the committed changes.