Re: grep: memory exhausted



On Wed, Nov 29, 2006 at 03:10:33PM -0500, van Osnabrugge, Sean wrote:
Hi there,



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.



Whenever I try to grep a large text file (400 MB+), grep terminates with
"grep: memory exhausted"



I have tried piping grep (cat "file" | grep "search term")

I have tried it with -line-buffered



ulimit -a show:

core file size (blocks, -c) unlimited

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

Attachment: pgpapBTXQzd77.pgp
Description: PGP signature



Relevant Pages

  • Re: Best way to get max KVA setting?
    ... > I could probably grep for this, but what's the best way to get a hold of ... > autosize option, and I want to base it on min so that it ... for the 8G of RAM in his 2G KVA space, ...
    (freebsd-current)
  • grep out of memory error
    ... I've got a minimum system running and just 10 minutes ago, I ran a 'grep' command and it returned an "out of memory" error. ... HOSTNAME kernel: pid 618, uid 0, was killed: out of swap space ... Running top beside the command gives you a nice view of what's happening: All of the RAM is used up almost instantly and the the swap space. ...
    (freebsd-hackers)
  • Re: grep out of memory error
    ... 'grep' command and it returned an "out of memory" error. ... HOSTNAME kernel: pid 618, uid 0, was killed: out of swap space ... but this seems a bit odd; I've got one GB of RAM and 512M ...
    (freebsd-hackers)
  • size of /proc/kcore grows?
    ... i've just tried to "search for something in the RAM", so i thougt ... grep for raw data throught it, i did not need any specific meta-data. ... since i have 256MB RAM. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Best way to get max KVA setting?
    ... I could probably grep for this, but what's the best way to get a hold of ... autosize option, and I want to base it on min (KVA, ram) so that it ... To unsubscribe, ...
    (freebsd-current)