Re: Will memory get over-used?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Sigh.. FFS... Here we go AGAIN.

there is currently a 2GB limit for all CLR objects, no matter what OS
you are running on 32 / 64 bit.

This is just plain WRONG.


By the way, your canned response is just as wrong this time as it was one
month ago when I corrected your mistakes:
http://groups.google.ca/group/microsoft.public.dotnet.languages.vb/browse_thread/thread/1e9765058791fa4a/9dfe1aff08a1da1f?lnk=st&q=Michel+Posseth+%5BMCP%5D+object+size&rnum=7#

You are either a masochist, or have a poor memory.. Hmm I see a pattern
here -
problems with memory limits..


http://msdn2.microsoft.com/en-us/library/ms241064(VS.80).aspx

We already did this. This horse is dead..

If you quote an authoritative source, DO NOT CHANGE IT. At all. EVER.
Add a comment if you must, and state this is from you, not the source.
Or start your own blog, doc site, or whatever. But quoting inaccurately
is BAD.


http://blogs.msdn.com/joshwil/archive/2005/08/10/450202.aspx

FFS - The TITLE of the article is "BigArray<T>, getting around the 2GB array
size limit"
uhmmm... To get around a 2gb "limit" would require being LARGER than 2gb,
correct?!?
You did not even understand the TITLE of the article?!? WTF?

Arrays are not objects. They are essentially value types layed out
sequentially in memory. Objects are very different. They allow you to have
fields, properties, methods, and internal state data and other good stuff.
They certainly can be LARGER than 2gb.

Public Class Foo()
Dim a(1024*1024*2000) as byte
Dim b(1024*1024*2000) as byte
etc..

How big is this object?

First sentence of the above article: "I've received a number of
queries as to why the 64-bit version of the 2.0 .Net runtime
still has array maximum sizes limited to 2GB"

Note that this is talking about ARRAYS. Not ArrayLISTS, not OBJECTS

Further: "Differing from this are arrays of reference types
(e.g. objects, strings, class Y {}, etc.), for these arrays the actual
array will be that of a bunch of references, initially null. To initialize
the array your code will need to go through one element at a time
and create or assign an appropriate instance of the type to that array
element. The 2GB size limit for arrays applies to this array of
references, not the instances of the objects themselves"

So the size of the Instances of the ITEMS (not just the references) in the
array can be vastly LARGER THAN 2gb.

And then in the comments:
http://blogs.msdn.com/joshwil/archive/2005/08/10/450202.aspx#450213
Last sentence says "It does make one biased twoards using arrays of
primitive data types where you can instead of boxed references (e.g.
ArrayList) to avoid the significantly heavier penalties that go with that
practice on the 64-bit platform."

Which basically says for the problem at hand in this thread, the ArrayLIST,
does not suffer
from the 2gb limit. But you will burn a bunch of space on all those big
pointers.. And all the boxing
overhead, etc.


So, in summary:
1) Your information was wrong one month ago, and is still wrong.
2) Unless you read and COMPREHEND your own links, you will never understand
the issues
3) Arrays are not the same as objects and ArrayLISTs
4) This thread was about arraylists, so your response was completely OFF
TOPIC
5) Quote articles correctly.
6) Include links that support your position, not ones that have MANY things
that contradict you

Good luck with your memory issues and reading comprehension..

Have I been trolled?!?


.



Relevant Pages

  • Re: Arrarys of reference
    ... to initialize the references correctly. ... Maybe because arrays of references often couldn't be ... | Register DCSR; ...
    (comp.lang.cpp)
  • Re: complex data structure
    ... > Jeff wrote: ... > is really the structure you want (scalar references to array references ... > dumped the keys/values to that hash. ... I had really wanted to push arrays on $hash ...
    (comp.lang.perl.misc)
  • Re: complex data structure
    ... > Jeff wrote: ... > is really the structure you want (scalar references to array references ... > dumped the keys/values to that hash. ... I had really wanted to push arrays on $hash ...
    (comp.lang.perl)
  • Re: Question of reference and (sub)strings.
    ... same block of memory as the original string - the allocation of a new ... (arrays are always arrays of arbitrarily typed objects - aren't they?) ... I think arrays of objects would necessarily be copy on write as a consequence of the Ruby model of references... ...
    (comp.lang.ruby)
  • Re: Fat references
    ... traditional style of placing a header with GC metadata before every value ... So now you have references that can't fit into a machine register. ... Fat pointers have been implemented in some C compilers, ... run-time bounds checking on arrays and other objects. ...
    (comp.compilers)