Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » what is the largest Array size please? ("out of memory" error)
Re: what is the largest Array size please? ("out of memory" error) [message #14951 is a reply to message #14915] Sat, 22 March 2008 00:49 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
nixnixnix wrote on Wed, 19 March 2008 13:11


typedef WithDeepCopy<Array <double> > doubleArray;



There can be 2 issues involved...

First, Array<double> is not optimal - this will need about

N * max(16, sizeof(double)) + N * sizeof(void *) * 1.33

memory.

Try using Vector<double> instead. You might also try SetCount or Shrink to get that "1.33" down to 1.

Then, the memory, at least for Vector (or "sizeof(void *") Smile need to be continous for single Vector (or Vector<void *> inside Array). On Win32, this might be a problem.

Anyway,

Quote:


array size appears to be a "mere" 617MB Smile"



well:

13393*5951*(16 + 1.33 * 4) = 1.7GB

Which looks like some 2GB limitation Smile

Mirek

[Updated on: Sat, 22 March 2008 00:56]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ChatClient with Ultimate++
Next Topic: What about "::" in LoadIniFile?
Goto Forum:
  


Current Time: Wed Sep 03 21:36:59 CEST 2025

Total time taken to generate the page: 0.05682 seconds