Date: Fri, 26 Oct 2018 23:12:30 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: "Bennett, Ciunas" <ciunas.bennett@intel.com> Cc: "freebsd-stable@freebsd.org" <freebsd-stable@freebsd.org> Subject: Re: Possible memory leak in the kernel (contigmalloc) Message-ID: <20181026201230.GV5335@kib.kiev.ua> In-Reply-To: <770FD3608C9E864796AB46CB37B561B1BDFCF0CD@IRSMSX101.ger.corp.intel.com> References: <770FD3608C9E864796AB46CB37B561B1BDFCF0CD@IRSMSX101.ger.corp.intel.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 24, 2018 at 04:27:52PM +0000, Bennett, Ciunas wrote: > Hello, > > I have encountered an issue with a kernel application that I have > written, the issue might be caused by a memory leak in the kernel. > The application allocates and deallocates contiguous memory using > contigmalloc() and contigfree(). The application will fail after a > period of time because there is not enough free contiguous memory > left. There could be an issue with the freeing of memory when using > the contigfree() function. > It is unlikely that there is an issue with a leak, but I would be not surprised if your allocation/free pattern would cause fragmentation on free lists that results in contigmalloc(9) failures after. Look at the vmstat -z/vmstat -m output to see uma and malloc stats. More interesting for your case can be the output from sysctl vm.phys_free which provides information about the free queues and order of free pages on them.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20181026201230.GV5335>