From owner-freebsd-stable@FreeBSD.ORG Thu Nov 30 04:41:42 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 04FC516A40F for ; Thu, 30 Nov 2006 04:41:42 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 22F0D43CA2 for ; Thu, 30 Nov 2006 04:41:36 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id A3EE71A3C20; Wed, 29 Nov 2006 20:41:41 -0800 (PST) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id F12AD51316; Wed, 29 Nov 2006 23:41:23 -0500 (EST) Date: Wed, 29 Nov 2006 23:41:23 -0500 From: Kris Kennaway To: "van Osnabrugge, Sean" Message-ID: <20061130044123.GA19761@xor.obsecurity.org> References: <7883F37393F1D44990888174C2E5E91222666A@TSV-EXCHANGE.ohhllp.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TB36FDmn/VVEgNH/" Content-Disposition: inline In-Reply-To: <7883F37393F1D44990888174C2E5E91222666A@TSV-EXCHANGE.ohhllp.com> User-Agent: Mutt/1.4.2.2i Cc: freebsd-stable@freebsd.org Subject: Re: grep: memory exhausted X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Nov 2006 04:41:42 -0000 --TB36FDmn/VVEgNH/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 29, 2006 at 03:10:33PM -0500, van Osnabrugge, Sean wrote: > Hi there, >=20 > =20 >=20 > I am running a fresh install of FreeBSD-6.1-Stable as a guest OS in > VMWare 1.0.1 with 1 GB of RAM. >=20 > =20 >=20 > Whenever I try to grep a large text file (400 MB+), grep terminates with > "grep: memory exhausted" >=20 > =20 >=20 > I have tried piping grep (cat "file" | grep "search term") >=20 > I have tried it with -line-buffered >=20 > =20 >=20 > ulimit -a show: >=20 > core file size (blocks, -c) unlimited >=20 > data seg size (kbytes, -d) 524288 Try increasing this. I think grep mmaps the file, so the large file could be exceeding your limit. Kris --TB36FDmn/VVEgNH/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFbmDzWry0BWjoQKURAq8kAJ4i6zNiXPiI/ILZuOSdWL1ATjaeNwCfbaQr roqJFwQNau2hGQfa5AD4b8g= =wVzX -----END PGP SIGNATURE----- --TB36FDmn/VVEgNH/--