|
|
|
|
#1 |
|
Senior Member
|
I'm not sure why but this example below will use upwards towards 90MB of memory within 20 mins. In my test I pointed the download file to something small, around 20K in size.
I've tested this bug(?) with various builds, including the latest CVS release. ------------------------- Name "memoryhole" OutFile "memoryhole.exe" Caption "memoryhole" SilentInstall silent Section "" foo: NSISdl::download http://www.noname.com/poo.jpg $EXEDIR\outfile.exe sleep 25 goto foo SectionEnd ------------------------- all work and no play makes jack a dull boy |
|
|
|
|
|
#2 |
|
Senior Member
|
Unless its leaking memory, I don't see a bug since its an infinite loop.
|
|
|
|
|
|
#3 | |
|
Senior Member
|
Quote:
all work and no play makes jack a dull boy |
|
|
|
|
|
|
#4 |
|
Debian user
(Forum King) Join Date: Jan 2003
Location: Arch land
Posts: 4,917
|
No, is not. Like rainwater said, you only have an endless loop, but it'll grab memory.
Leak is when you don't empty the space in the memory. In this case you just loading up. * PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE. * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE. |
|
|
|
|
|
#5 |
|
Senior Member
|
so why is it gobbling up memory and how can it be freed?
all work and no play makes jack a dull boy |
|
|
|
|
|
#6 |
|
Debian user
(Forum King) Join Date: Jan 2003
Location: Arch land
Posts: 4,917
|
mmm, because there's no exit for the loop.
* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE. * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE. |
|
|
|
|
|
#7 |
|
Senior Member
|
what you say makes no sense. I don't see why having "no exit for the loop" is a reason for this example to gobble 90MB+ in less than 20 mins.
all work and no play makes jack a dull boy |
|
|
|
|
|
#8 |
|
Forum King
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
|
that's how IE works, and i think not NSIS is to blame for this
|
|
|
|
|
|
#9 |
|
NSIS MUI Dev
Join Date: Nov 2001
Posts: 3,717
|
NSISdl does not use IE.
|
|
|
|
|
|
#10 | |
|
Debian user
(Forum King) Join Date: Jan 2003
Location: Arch land
Posts: 4,917
|
Quote:
* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE. * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE. |
|
|
|
|
|
|
#11 |
|
Senior Member
|
ah, so the usage is keeping track of where it is in the loop?
all work and no play makes jack a dull boy |
|
|
|
|
|
#13 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
No, that's not supposed to happen. No API call should increase memory usage when used in a loop assuming its freeing function is also called in the loop.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#14 | |
|
Senior Member
|
Quote:
all work and no play makes jack a dull boy |
|
|
|
|
|
|
#15 |
|
Debian user
(Forum King) Join Date: Jan 2003
Location: Arch land
Posts: 4,917
|
It's not a NSIS bug. It's the computer working out with an endless loop.
* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE. * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE. |
|
|
|
|
|
#16 |
|
NSIS MUI Dev
Join Date: Nov 2001
Posts: 3,717
|
It is a bug in the NSISdl plug-in.
|
|
|
|
|
|
#17 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Lobo, try:
loop: sleep 1 goto loop NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#18 |
|
Debian user
(Forum King) Join Date: Jan 2003
Location: Arch land
Posts: 4,917
|
code: The memory usage of the EXE still 2,188 KB. No overflow of the memory... * PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE. * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE. |
|
|
|
|
|
#19 |
|
NSIS MUI Dev
Join Date: Nov 2001
Posts: 3,717
|
Indeed. So there is something wrong with NSISdl.
|
|
|
|
|
|
#21 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
The main leak is in your code. You forgot to Pop the returned value. This leaks 1KB each iteration of the loop. Other than that, there were some problems with NSISdl. Hopefully they were all fixed in the latest CVS version. See the change log for more details.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|