cvs commit: src/sys/vm memguard.c

Alfred Perlstein alfred at freebsd.org
Wed Feb 16 04:59:10 GMT 2005


* Bosko Milekic <bosko.milekic at gmail.com> [050215 17:35] wrote:
> 
> I'd like to get MemGuard to accept a boot-time tunable way of
> configuring which malloc type(s) to override, but this is yet to be
> implemented.  Similarly, it would be worth getting MemGuard to also
> override certain UMA zone allocations.

I think you can do this like so:

Do a getenv to get the tunable string, then traverse the malloc_type
list setting a flag in the struct, then when you malloc you just
test the flag.

It'd be a little bit of parsing in the kernel, but not much more
than strsep.

-Alfred


More information about the cvs-all mailing list