Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > BinaryWrite and w3wp.exe memory leak

Thread Tools

BinaryWrite and w3wp.exe memory leak
Posts: n/a
I try to download very large file using ASP and BinaryWrite. But ASP
+W3WP allocates a lot of memory. I write the file using blocks. It
works great in IIS4 and 5, does not work in IIS 6.

Sample code causing the error is bellow. The code writes 100000B
blocks, with buffer=false, but it allocates 1GB of memory, not 10kB as

Thank you for help

Const BlockSize = 100000
Const DownloadSize = 1000000000

Dim BlockData, BlockCounter
BlockData = space(BlockSize/2)
'Switch off buffer.
Response.Buffer = False

'This is download
Response.ContentType = "application/x-msdownload"

For BlockCounter = 1 To DownloadSize Step BlockSize
Response.BinaryWrite BlockData

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory leak even after deleting memory pointers from vector cham C++ 5 09-25-2008 10:30 AM
Leak or no leak ?? Richard Heathfield C Programming 4 07-10-2006 11:37 AM
Dynamic memory allocation and memory leak... s.subbarayan C Programming 10 03-22-2005 02:48 PM
Memory leak??? (top reporting high memory usage under Solaris) Mark Probert Ruby 4 02-09-2005 06:13 PM
How can I user binarywrite and frames? Vinay ASP .Net 2 11-07-2003 09:53 PM