Date: Wed, 6 Nov 2002 14:16:00 -0500 (EST) From: Jeff Roberson <jroberson@chesapeake.net> To: Poul-Henning Kamp <phk@FreeBSD.org> Cc: cvs-committers@FreeBSD.org, <cvs-all@FreeBSD.org> Subject: Re: cvs commit: src/sys/sys malloc.h src/sys/kern kern_malloc.c Message-ID: <20021106141427.J1374-100000@mail.chesapeake.net> In-Reply-To: <200211011858.gA1IwDrc035364@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 1 Nov 2002, Poul-Henning Kamp wrote: > phk 2002/11/01 10:58:13 PST > > Modified files: > sys/sys malloc.h > sys/kern kern_malloc.c > Log: > Introduce malloc_last_fail() which returns the number of seconds since > malloc(9) failed last time. This is intended to help code adjust > memory usage to the current circumstances. > > A typical use could be: > if (malloc_last_fail() < 60) > reduce_cache_by_one(); > > Revision Changes Path > 1.113 +16 -0 src/sys/kern/kern_malloc.c > 1.68 +1 -0 src/sys/sys/malloc.h > I would like to add a 'flush' callback to uma. So each zone could get a callback when the system is low on memory and it could reduce it's memory footprint. This would be very effective for something like the vnode cache or the directory cache, etc. What do you think of this? It would be trivial to add. Cheers, Jeff To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021106141427.J1374-100000>