[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Memory leak in for loops
From: |
Sandino Araico Sánchez |
Subject: |
Memory leak in for loops |
Date: |
Wed, 29 Apr 2009 12:43:29 -0500 |
User-agent: |
Thunderbird 2.0.0.21 (X11/20090405) |
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: x86_64-pc-linux-gnu-gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='l$
uname output: Linux cannelloni 2.6.27.10-grsec-2.1.12-vs2.3.0.36.4 #1
SMP Fri F$
Machine Type: x86_64-pc-linux-gnu
Bash Version: 3.2
Patch Level: 39
Release Status: release
Description:
This is the code that provokes the memory leak:
http://pastebin.ca/1407549
1.
#!/bin/bash
2.
3.
for i in {0..150000000} ; do
4.
echo $i > /dev/null
5.
done
Repeat-By:
Run the script above and the process starts leaking memory very
fast.
--
Sandino Araico Sánchez
http://sandino.net
- Memory leak in for loops,
Sandino Araico Sánchez <=