473,472 Members | 2,174 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How do I determine amount of memory I can have?

Using #ZipLib, I'm zipping up large files (100MB & >). I'm using a byte
array to read in the file and write out to the zip file. The bigger the
chunks I can read in the faster the zipping goes. What's the best way
to determine how big I can make the byte array? I'm guessing that I
would determine the amount of available memory and take a percentage of
that?

OR: does anyone have any code using #ZipLib that demonstrates how to zip
files of any size?

The error I'm getting is:
Insufficient system resources exist to complete the requested service.

Here's the code I'm using:
dim buffer(33554432) as Byte '32MB Buffer
While fs.Position < fs.Length
If (fs.Position + 33554432) < fs.Length Then
fs.Read(buffer, 0, buffer.Length)
s.Write(buffer, 0, buffer.Length)
Else
Dim rdlen As Long = fs.Length - fs.Position
fs.Read(buffer, 0, rdlen)
s.Write(buffer, 0, rdlen)
End If
End While

*** Sent via Developersdex http://www.developersdex.com ***
Nov 21 '05 #1
0 1045

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Avi Kak | last post by:
Hello: My apologies in advance for asking a question that probably has been raised numerous times already in this newsgroup. My Google search did not lead me to an answer I could use. Is...
17
by: John Bentley | last post by:
John Bentley: INTRO The phrase "decimal number" within a programming context is ambiguous. It could refer to the decimal datatype or the related but separate concept of a generic decimal number....
2
by: Tim Richardson | last post by:
I've been doing a lot of reading on this and my head is starting to hurt! It seems to be quite a feat to work out how much memory is actually being used by our server. I'm running W2K advanced...
31
by: bilbothebagginsbab5 AT freenet DOT de | last post by:
Hello, hello. So. I've read what I could find on google(groups) for this, also the faq of comp.lang.c. But still I do not understand why there is not standard method to "(...) query the...
0
by: Tomas | last post by:
I have two questions: (1) How (if possible) can you, with ASP.NET (and with the IIS 5 included with win2000) specify an maximum limit of the memory that a web application may consume, as an...
6
by: Daniel Walzenbach | last post by:
Hi, I have a web application which sometimes throws an “out of memory” exception. To get an idea what happens I traced some values using performance monitor and got the following values (for...
5
by: sunny | last post by:
Hi All Is there any way to determine stack and heap size, during runtime. i.e can we predict stack overflow. etc
14
by: Karch | last post by:
I need to find the fastest way in terms of storage and searching to determine if a given string contains one of a member of a list of strings. So, think of it in terms of this: I have a string such...
158
by: jty0734 | last post by:
i don't know what input size of string is. so i can't gets inputsize before malloc function. i want determine the size of malloc without get inputsize in advance. how to deal with it?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.