Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Oct 2005 21:13:57 +0800
From:      "nocool" <nocool@263.net>
To:        "freebsd-hackers" <freebsd-hackers@freebsd.org>
Cc:        das <das@FreeBSD.org>, freebsd-current <freebsd-current@freebsd.org>, delphij <delphij@FreeBSD.org>
Subject:   where to release proc.p_stats
Message-ID:  <20051021131329.A16FC126E@smtp.263.net>

next in thread | raw e-mail | index | archive | help

freebsd-hackers£¬hello

	Question about 5.4 kernel source code.
	I have some question about strust proc's initialize. Kernel use proc_zone to allocate proc items and initialize them with proc_init (sys\kern\kern_proc.c) function. In this function, we can find the field proc.p_stats is allocated with pstats_alloc(), as 

p->p_stats = pstats_alloc();  

and pstats_alloc is realized as 

malloc(sizeof(struct pstats), M_SUBPROC, M_ZERO|M_WAITOK);

But I can't find where this field is freed. If it will not be release, will there be memory leakage?



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡nocool
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡nocool@263.net
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2005-10-21


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