473,471 Members | 1,938 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

memory question, can you specify max memory?

I am getting an out of memory exception when spinning up a few hundred
threads all processing sizable amounts of XML. Is there any way to specify
min/max heap as there is with the java -Mx128 type switches to the JVM?
(don't remember the exact syntax of the jvm param)

Thanks in advance!

Derrick
Nov 16 '05 #1
3 2374
>I am getting an out of memory exception when spinning up a few hundred
threads all processing sizable amounts of XML. Is there any way to specify
min/max heap as there is with the java -Mx128 type switches to the JVM?
(don't remember the exact syntax of the jvm param)


I think it's the default stack size you want to change, not the heap.
You can do that with Exitbin.exe and its /stack option. However, I
would recommend reconsidering your design first. Do you really need
hundreds of threads running? Why not use the thread pool?

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 16 '05 #2
I don't think so. Out of memory are not stack overflow exceptions.
Increasing the statck size here would only make things worse.

Willy.

"Mattias Sjögren" <ma********************@mvps.org> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I am getting an out of memory exception when spinning up a few hundred
threads all processing sizable amounts of XML. Is there any way to
specify
min/max heap as there is with the java -Mx128 type switches to the JVM?
(don't remember the exact syntax of the jvm param)


I think it's the default stack size you want to change, not the heap.
You can do that with Exitbin.exe and its /stack option. However, I
would recommend reconsidering your design first. Do you really need
hundreds of threads running? Why not use the thread pool?

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Nov 16 '05 #3
No you can't, the max. process space is exceeded.
The overflow is due to the amount threads you are creating, each thread has
a reserved default stack of 1MB, so if you say a few hundred threads you
take a few hundred MB as stack space alone, add to that amount the space
taken by your application (especially the XML data) and you are exceeding
the maximum size of your system's virtual memory size (free RAM size + free
page file space).
What you should do is reduce the number of threads to a reasonable number,
say # CPU + 1 if your thread procedures are executing a fair amount of IO or
simply a single thread if no IO is done at all.

WIlly.

"Derrick" <de*********@excite.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I am getting an out of memory exception when spinning up a few hundred
threads all processing sizable amounts of XML. Is there any way to
specify
min/max heap as there is with the java -Mx128 type switches to the JVM?
(don't remember the exact syntax of the jvm param)

Thanks in advance!

Derrick

Nov 16 '05 #4

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

Similar topics

5
by: Kenneth W Del Signore | last post by:
Hi, I'm working on a scheme to store several millions of records (Subdata), each of which contains a variable number of sub records (Celldata). My concern is that my prototype uses a lot more...
22
by: xixi | last post by:
hi, we are using db2 udb v8.1 for windows, i have changed the buffer pool size to accommadate better performance, say size 200000, if i have multiple connection to the same database from...
3
by: Justin To via AccessMonster.com | last post by:
I just distributed a FE mde file throught my department, and while stress testing on the performance of the new release, 3 users got the following error: The instruction at ... referenced memory...
4
by: Chang Byun | last post by:
I have question about memory allocation. I have a trouble when I run a C program. My C program has several big double pointer(** var) variables to structure data like 4 by 5000000. It is...
10
by: s.subbarayan | last post by:
Dear all, I happen to come across this exciting inspiring article regarding memory leaks in this website: http://www.embedded.com/story/OEG20020222S0026 In this article the author mentions:...
4
by: Julián Sanz García | last post by:
Hi!!, How can i use Ram memory or virtual memory to crear a file??? The idea is to create a file in a temporaly space, something like RAM memory or virtual memory. Thanks
1
by: liuhaoran | last post by:
HI. i have a question about memory error. when i change double variable to float variable ,for example: int curGen = 0; double sum = 0; // m_iPopSize is int variable ,NewPop is a vector...
2
by: nguyenlh | last post by:
I'm studying about Memory managerment - stack memory and I can't understand the following problems : Who can help me >> - Role of Stack memory -How to store address in stack memory -Garbage...
1
by: Crash | last post by:
..Net - All versions I have Essential .Net Vol 1 (Don Box) and the Jeffrey Richter articles on the .NET heap - they are both excellent reads. But I am still unclear on the big pinned memory...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.