From owner-freebsd-questions@FreeBSD.ORG Tue Sep 22 10:43:57 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A24F1065672 for ; Tue, 22 Sep 2009 10:43:57 +0000 (UTC) (envelope-from modulok@gmail.com) Received: from mail-px0-f191.google.com (mail-px0-f191.google.com [209.85.216.191]) by mx1.freebsd.org (Postfix) with ESMTP id 649FA8FC0A for ; Tue, 22 Sep 2009 10:43:57 +0000 (UTC) Received: by pxi29 with SMTP id 29so3182505pxi.14 for ; Tue, 22 Sep 2009 03:43:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=sO+IJJvKKqgNBGpDwEm2UojutF4NjFS5+k9lPAWl+jQ=; b=AqW+wb8tz9yd4IPkZWQQTszZ1YWLcUND0yPE78N4QLuF5CjoVW/scLLDKxenHP9Do1 Z4ZCOtjjj0ps6FzR/jtpZRk6ECLbyCLMmnsN+E96HLqULGBErOwuMjjYX30rS0bHrbPf Ggb3XUKZBSQTGkv070fA5W7SHU8OgTFVNv574= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=nOLRNlI2ubSgkFQMMwx2SpNeFPyrCP89UAniF0b9UqsGB1P8THElnonuiuBadNbqlF Ta033/VzBK1puG4Q2CJt9eBl9Dazh1h6+gWLhX+kTYdu1Zgx34O542WvPIzmdwc0uKSI mqJo4OdK/mZ2V6gHmzp5JwQqc6aBAcN7nVAGw= MIME-Version: 1.0 Received: by 10.143.154.33 with SMTP id g33mr51174wfo.300.1253616237135; Tue, 22 Sep 2009 03:43:57 -0700 (PDT) Date: Tue, 22 Sep 2009 04:43:57 -0600 Message-ID: <64c038660909220343w3ae0607bq8aad1c370ebf00aa@mail.gmail.com> From: Modulok To: FreeBSD Questions Content-Type: text/plain; charset=ISO-8859-1 Subject: Is this a kernel memory leak or a process memory leak? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2009 10:43:57 -0000 List, Maybe I'm just not that bright, but I have a question regarding the following: man 3 getenv "Successive calls to setenv() or putenv() assigning a differently sized value to the same name will result in a memory leak. The FreeBSD seman- tics for these functions (namely, that the contents of value are copied and that old values remain accessible indefinitely) make this bug unavoidable. Future versions may eliminate one or both of these semantic guarantees in order to fix the bug." This is a memory leak within the process which calls sentenv() or putenv(), not a memory leak in the kernel, right? Like, if I called putenv() a in a loop and then exited the process, the kernel will reclaim that cluster-fuck of lost allocated memory, right? (If it's a kernel leak that would be super retarded as any process could affectively starve the kernel of memory. ) So it's a userland leak right? Anybody? -Modulok-