From owner-freebsd-hackers Thu Jan 26 11:00:00 1995 Return-Path: hackers-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id LAA01300 for hackers-outgoing; Thu, 26 Jan 1995 11:00:00 -0800 Received: from minnow.render.com (render.demon.co.uk [158.152.30.118]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id KAA01251 for ; Thu, 26 Jan 1995 10:58:43 -0800 Received: (from dfr@localhost) by minnow.render.com (8.6.9/8.6.9) id QAA00710; Thu, 26 Jan 1995 16:22:37 GMT Date: Thu, 26 Jan 1995 16:22:33 +0000 (GMT) From: Doug Rabson To: hackers@FreeBSD.org Subject: telldir Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: hackers-owner@FreeBSD.org Precedence: bulk Telldir seems to be a cause of memory leaks in FreeBSD-2.0. It allocates memory on each call to telldir and the memory is not freed unless seekdir is called for the telldir cookie which was returned. For programs which call telldir many more times than seekdir, this can become a problem. I have noticed that the samba lanmanager server loses a hugh amount of memory in this way. Does anyone have any objections to me changing the code so that closedir reclaims memory for any outstanding telldir cookies? The manpage states that they are not useful after the directory is closed anyway. -- Doug Rabson, RenderMorphics Ltd. Mail: dfr@render.com Phone: +44 71 251 4411 FAX: +44 71 251 0939