|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Data Types and structure Memory Usage?Hi,
I need info about how much memory different data types (particulary bitarrays, listarray, ...) and structures uses (including overhead). Is there any place where I can find that info (article, paper, ...). Thanks, James Hi Cor,
I need this for a regular vb.net program. I am using quiet a few structures and bitarrays, Example: If I use 1 Million bitarrays of length 8, I supposed this will be using: 1 Million x 1 byte + 1 Million pointers of 4 bytes = 5 Mbytes Is that correct, or there any additional overhead (example: does bitarray keep the lenght of each bitarry in a variable)? What is the difference if I used a structure or a Jagged array, is there any additional overhead? Thanks, Jaime Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> escribió en el mensaje news:%23C9LTe6MGHA.3064@TK2MSFTNGP10.phx.gbl... > James, > > Are you asking this for PDA? > > Cor > > >If I use 1 Million bitarrays of length 8, I supposed this will be using: The BitArray internally stores the bits in an Integer array. For only>1 Million x 1 byte + 1 Million pointers of 4 bytes = 5 Mbytes >Is that correct, or there any additional overhead (example: does bitarray >keep the lenght of each bitarry in a variable)? 8 bits a single element array is enough. In addition to the array reference the class has two private Integer variables (and in v2.0 there's also an Object variable). I can't say exactly what the total memory required is for each BitArray is since I don't know what the array descriptor overhead is, but on a 32-bit system it probably sums up to around 40-50 bytes. Mattias -- Mattias Sjögren [C# MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com Please reply only to the newsgroup.
Replace Selected Text
printing problem with dotmatrix printer using vb.net Which collection object to use similar to SortedList\Hashtable Different Approaches to Saving settings: Which is better? Properties of a Property How to load hierarchical Db data in treeview?? Windows XP Style Activating Windows Forms Implicit Conversion from Bitmap to Image? Open then Close Explorer directory using Process.Start |
|||||||||||||||||||||||