From owner-cvs-all Mon Sep 9 4:16:52 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 61E5C37B400; Mon, 9 Sep 2002 04:16:47 -0700 (PDT) Received: from baraca.united.net.ua (ns.united.net.ua [193.111.8.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9BF5043E65; Mon, 9 Sep 2002 04:16:45 -0700 (PDT) (envelope-from sobomax@FreeBSD.org) Received: from vega.vega.com (xDSL-2-2.united.net.ua [193.111.9.226]) by baraca.united.net.ua (8.11.6/8.11.6) with ESMTP id g89BGbS05452; Mon, 9 Sep 2002 14:16:40 +0300 (EEST) (envelope-from sobomax@FreeBSD.org) Received: from FreeBSD.org (big_brother.vega.com [192.168.1.1]) by vega.vega.com (8.12.5/8.12.5) with ESMTP id g89BGidO012768; Mon, 9 Sep 2002 14:16:44 +0300 (EEST) (envelope-from sobomax@FreeBSD.org) Message-ID: <3D7C835D.2762C1F6@FreeBSD.org> Date: Mon, 09 Sep 2002 14:17:49 +0300 From: Maxim Sobolev Organization: Vega International Capital X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en,uk,ru MIME-Version: 1.0 To: Jeremy Lea Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/pkg_install/version perform.c version.h References: <200209090800.g8980W9T021683@freefall.freebsd.org> <20020909105759.GA61587@shale.csir.co.za> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Jeremy Lea wrote: > > Hi, > > On Mon, Sep 09, 2002 at 01:00:32AM -0700, Maxim Sobolev wrote: > > sobomax 2002/09/09 01:00:32 PDT > > > > Modified files: > > usr.sbin/pkg_install/version perform.c version.h > > Log: > > Vastly decrease amount of memory comsumed in the case when we have to read > > ports/INDEX, by allocating eactly amount of memory necessary for storing > > each particular entry, insdead of 4K per entry (more than 7000 entries - > > go figure). Memory consumption went down to some 500K from some 30M. > > Thanks. I didn't even really look at the memory consumption when the > index was loaded. So as I, until I've tried to do pkg_version on low-end machine with no swap space configured. Imagine my surprise when I've got 'out of swap space' error! > The change on line 68 looks a little funky though? Oh, yeah, this is leftover from my debugging session (the name of the port on which pkg_version's memory consumption was skyrocketing for me). Fixed, thank you for pointing it out. -Maxim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message