]> git.michaelhowe.org Git - packages/o/openafs.git/commit
Fix memory allocation warnings at shutdown
authorMarc Dionne <marc.c.dionne@gmail.com>
Sat, 31 Oct 2009 12:54:52 +0000 (08:54 -0400)
committerRuss Allbery <rra@debian.org>
Mon, 30 Nov 2009 22:50:34 +0000 (14:50 -0800)
commite946fcf7691407a4f9c5985da9bd65095ab04295
tree37b488299c229ff0f32286e3fe0d2656b8997b2b
parent4cd191029b5d58f9f311cb60a31b8e7b4ded0a07
Fix memory allocation warnings at shutdown

At shutdown we check for unfreed memory allocated with AllocSmallSpace
and AllocLargeSpace and complain in the syslog if there are dangling
pieces.  This patch takes care of a few cases that always showed up
as warnings, even after a simple start-stop of the client.

- The cacheInode file needs to be closed before the checks, since it
uses a large piece for its struct file.

- The ICL logging code allocates 6 small pieces that are never freed.
Add a shutdown_icl() function that releases everything.  While we're
at it, correct one place where we allocated with afs_osi_Alloc but
freed with osi_FreeSmallSpace, confusing our accounting.

Change-Id: I4c28c848f155dec9d89e6199cde34209227ca5c9
Reviewed-on: http://gerrit.openafs.org/758
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-on: http://gerrit.openafs.org/767
src/afs/afs_call.c
src/afs/afs_prototypes.h