473,978 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
+ 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 2393
>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.o rg> wrote in message
news:%2******** ********@TK2MSF TNGP14.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*********@ex cite.com> wrote in message
news:%2******** ********@TK2MSF TNGP14.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
2315
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 memory than I'm expecting. To store 1.7million Subdatas that have an average of 7 Celldatas, I'm using 85 Mb. Thats about 50 bytes/record, where as actual data is about 14 bytes/record (average). Any insight is greatly appreciated! Ken
22
3508
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 application server, will each connection take the memory 800M (200000 x 4k = 800 M), so the memory took will be 800M times number of connections, or the total memory get from bufferpool will be 800M?
3
9619
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 at ... The memory cannot be "read". this seems like a computer-local problem as I cannot reproduce the same error on any other computers I tried running Dr. Watson (win2k) and it says "Exception number: c0000005
4
2719
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 supposed to calculate those varibles with different parameters repeatedly with same size of variables. When it is running, the first several run is fine But it uses more and more memory, is used up all the main memory and swap memory and is stop.
10
2794
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: "At a certain point in the code you may be unsure if a particular block is no longer needed. If you free() this piece of memory, but continue to access it (probably via a second pointer to the same
4
1131
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
1412
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 int NumToAdd = m_iPopSize - NewPop.size();
2
1388
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 collection process in stack memory -Reuse and access address in stack memory I'm a newbie >>> Thanks very much...
1
2359
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 question: Pinned memory: if I have a block of pinned memory active on the heap when a garbage collection occurs where does the garbage collector set the NextObj pointer? Can the garbage collector/heap allocator logic work around the pinned block...
0
10359
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11835
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10922
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
10088
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8466
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7621
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3774
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.