473,404 Members | 2,213 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Limit on static data size?

Hi All,

Does anyone know if there is a limit on the size of data that can be stored in an object? I have two arrays that are declared "public static readonly ushort[][]" that contain 106 000 ushort arrays of up to 10 ushorts. There are also two arrays declared "public static readonly int[]" with the same number of elements. When running I get an InvalidProgramException, which indicates that the MSIL is bad, or at least that the JIT compiler cannot make sense of it.

Any ideas?

Thanks,
Paul
Jul 31 '06 #1
1 1129
Hi All,

Does anyone know if there is a limit on the size of data that can be stored in an object? I have two arrays that are declared "public static readonly ushort[][]" that contain 106 000 ushort arrays of up to 10 ushorts. There are also two arrays declared "public static readonly int[]" with the same number of elements. When running I get an InvalidProgramException, which indicates that the MSIL is bad, or at least that the JIT compiler cannot make sense of it.

Any ideas?

Thanks,
Paul
It seems this problem has to do not with the size of the arrays, but possibly with the number of memory allocations. Using a ushort[][] will result in a memory allocation for the outer array and then for each array within that array - in my case over 200 000. .NET seems to have a limit of 32768 memory allocations - not sure if it is within the static constructor, or if it is a general limit. I have managed to get around the problem by making first a 2 dimensional array ushort[,] and then a 1 dimensional array ushort[] for performance reasons.

If anyone can shed light on this or point me to something that is documented I would appreciate it.

Paul
Aug 1 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Noyb | last post by:
I've set up a news links section using the RSS parsing tutorial found here: http://www.sitepoint.com/article/560 Everything works great but depending on the feed source there may be 3 news links...
8
by: Randell D. | last post by:
Folks, Sorry for the cross post into multiple newsgroups on this, but html forms processing is supported across all three groups so I was hoping someone might know. I did a check with Google...
0
by: D. Dante Lorenso | last post by:
I need to know that original number of rows that WOULD have been returned by a SELECT statement if the LIMIT / OFFSET where not present in the statement. Is there a way to get this data from PG ?...
4
by: bdotson | last post by:
Does anyone know the record limit for a single table in Access 97? I have a client who has over 800,000 records in one table. They are experiencing math problems and timeouts when running reports....
8
by: Peter Ballard | last post by:
Hi all, I've got a C program which outputs all its data using a statement of the form: putchar(ch, outfile); This has worked fine for years until it had to output more than 2GB of data...
3
by: Rakesh | last post by:
Hi, Is there any limit to the number of rows a datagrid can display? Thanks, Rakesh
27
by: ted benedict | last post by:
hi everybody, i hope this is the right place to discuss this weird behaviour. i am getting dynamically generated text or xml from the server side using xmlhttprequest. if the server side data is...
5
by: Steve | last post by:
WSE352 Size of the record exceed its limit I have a C#.Net windows app that calls a FileNet web service. I can run a select against the web service and it returns up to 7,200 records with 5...
81
by: Peter Olcott | last post by:
It looks like System::Collections::Generic.List throws and OUT_OF_MEMORY exception whenever memory allocated exceeds 256 MB. I have 1024 MB on my system so I am not even out of physical RAM, much...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
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...
0
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,...
0
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...

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.