Page MenuHomeFreeBSD

malloc: make malloc_large closer to standalone
ClosedPublic

Authored by mjg on Nov 12 2020, 9:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 7, 11:36 PM
Unknown Object (File)
Mon, Oct 6, 2:01 PM
Unknown Object (File)
Sep 15 2025, 11:35 PM
Unknown Object (File)
Sep 10 2025, 12:56 PM
Unknown Object (File)
Sep 5 2025, 11:53 PM
Unknown Object (File)
Jul 31 2025, 2:56 AM
Unknown Object (File)
Jul 12 2025, 1:14 AM
Unknown Object (File)
Jul 2 2025, 6:57 AM
Subscribers

Details

Summary

This moves entire large alloc handling out of all consumers, apart from deciding to go there.

Apart from shortening malloc as it is it makes it feasible to replace the allocation code with smaller helpers to create a fast path.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mjg requested review of this revision.Nov 12 2020, 9:12 PM
markj added inline comments.
sys/kern/kern_malloc.c
590 ↗(On Diff #79483)

Below it is ifdef DEBUG_REDZONE, would be nice to make it consistent.

This revision is now accepted and ready to land.Nov 13 2020, 3:47 PM
  • fix a redzone bug. malloc_dbg can bump the size over kmem_zmax, meaning it has to happen before checking for malloc_large
This revision now requires review to proceed.Nov 16 2020, 12:34 AM
This revision is now accepted and ready to land.Nov 16 2020, 5:01 PM
This revision was automatically updated to reflect the committed changes.