Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Feb 2005 20:59:09 -0800
From:      Alfred Perlstein <alfred@freebsd.org>
To:        Bosko Milekic <bosko.milekic@gmail.com>
Cc:        Bosko Milekic <bmilekic@freebsd.org>
Subject:   Re: cvs commit: src/sys/vm memguard.c
Message-ID:  <20050216045909.GP32955@elvis.mu.org>
In-Reply-To: <bbebbd3d050215173551a44520@mail.gmail.com>
References:  <200502152217.j1FMH7Qf054657@repoman.freebsd.org> <20050215224018.GJ32955@elvis.mu.org> <421287CD.1080106@elischer.org> <bbebbd3d050215173551a44520@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
* Bosko Milekic <bosko.milekic@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050216045909.GP32955>