Page MenuHomeFreeBSD

malloc: Fix domainset usage in malloc_domainset() for large allocs
ClosedPublic

Authored by markj on Fri, Jul 17, 9:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Aug 13, 1:13 AM
Unknown Object (File)
Tue, Aug 11, 3:14 PM
Unknown Object (File)
Tue, Aug 11, 4:49 AM
Unknown Object (File)
Tue, Aug 11, 3:40 AM
Unknown Object (File)
Mon, Aug 10, 11:36 AM
Unknown Object (File)
Mon, Aug 10, 5:44 AM
Unknown Object (File)
Sun, Aug 9, 6:25 AM
Unknown Object (File)
Sun, Aug 9, 5:59 AM
Subscribers

Details

Summary

We should of course pass the provided domainset rather than copying what
plain malloc() does.

Fixes: 89deca0a3361 ("malloc: make malloc_large closer to standalone")

Diff Detail

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

Event Timeline

Maybe one day we should plumb it for malloc_dbg / memguard_alloc too.

This revision is now accepted and ready to land.Fri, Jul 17, 9:22 PM

Maybe one day we should plumb it for malloc_dbg / memguard_alloc too.

Do you use memguard at all? I haven't needed to reach for it since KASAN was added.

Maybe one day we should plumb it for malloc_dbg / memguard_alloc too.

Do you use memguard at all? I haven't needed to reach for it since KASAN was added.

Yes, though maybe there's a better way to do what we're doing. memguard can be used with only small performance impact for types/zones that don't match vm.memguard.desc. Actually I was recently thinking about a way to use memguard more broadly for infrequent allocations.