Date: Thu, 20 May 2004 09:28:12 -0400 From: Chuck Swiger <cswiger@mac.com> To: Till Plewe <till@score.is.tsukuba.ac.jp> Cc: freebsd-questions@freebsd.org Subject: Re: memory allocation/deallocation (malloc experts needed) Message-ID: <40ACB26C.9060901@mac.com> In-Reply-To: <20040520050918.GA85327%till@score.is.tsukuba.ac.jp> References: <20040520050918.GA85327%till@score.is.tsukuba.ac.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
Till Plewe wrote: > My problem is essentially that freeing large numbers of small chunks > of memory can be very slow. I have run into this problem twice so far. [ ... ] > One solution would be to divide the memory in larger regions and to > tell malloc which chunk to use for the next few calls, respectively when a > whole chunk could be freed. But I don't know how to do this. Consider using (or searching for information about) a zone-based malloc. NEXTSTEP used one and hence Darwin/OS X probably have sources available for you to consider... -- -Chuck
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40ACB26C.9060901>