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)
Sun, May 19, 7:52 PM
Unknown Object (File)
Sat, May 18, 1:28 PM
Unknown Object (File)
Fri, May 17, 5:31 AM
Unknown Object (File)
Fri, May 17, 5:31 AM
Unknown Object (File)
Fri, May 17, 5:28 AM
Unknown Object (File)
Fri, May 10, 7:14 AM
Unknown Object (File)
Thu, May 9, 7:34 AM
Unknown Object (File)
Apr 26 2024, 10:50 PM
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.