.net - Reallocating matrix from unmanaged to managed -


i've been trying piece of code working reallocate huge unmanaged matrix structure (namely std::vector<std::vector<t> >) equivalent managed structure( cli::array<t,2>). can't hold both structures in memory @ once opted write file , read structure back. problem once delete original matrix, , hence memory trying allocate managed memory matrix fails.

i image might have heaps of different runtimes cpp vs clr. can't find specific details. possible cpp runtime keeping heap space, prevents clr heap allocate matrix back? if so, possible force cpp runtime clean heap space in order make room clr heap.

now clarify, destination matrix has bidimensional array, not jagged array. know has problem can't resized. otherwise might able move matrix smaller chunks.

thanks, in advance.

if can't have both in memory @ same time, guess array more gigabyte in size. if want put in managed rectangular (non-jagged) array, clr have find gigabyte of contiguous memory... fail easily.

have tried run 64 bit version, or 32 bit version declared "large adress awarene"? latter give 4 gigabytes adress space if running on 64 bit windows machine, might fit.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -