Hi guys:
I have the fellowing code with IDL 8.2 in 32bit windows 7.
IDL> dstruct = {data:fltarr([161, 111, 1, 1, 41, 51])}
IDL> help,dstruct.data
FLOAT = Array[161, 111, 1, 1, 41, 51]
Above code is ok. But when I use hash,
IDL> d=hash()
IDL> d['dstruct'] = temporary(dstruct)
IDL> help,d['dstruct'].data
% Unable to allocate memory: to make array.
Not enough space
% Execution halted at: $MAIN$
As you see, I use temporary, which not increase any variables, but I get "Unable to allocate memory". So, how to solve this?
PS, I find the difference structure and hash about memory using , like hash use more memory.
IDL> dstruct = {data:fltarr([161, 111, 1, 1, 41, 51])}
IDL> help, dstruct.data
FLOAT = Array[161, 111, 1, 1, 41, 51]
IDL> .reset
IDL> d=hash()
IDL> d['dstruct'] = {data:fltarr([161, 111, 1, 1, 41, 51])}
IDL> help,d['dstruct'].data
% Unable to allocate memory: to make array.
Not enough space
% Execution halted at: $MAIN$
Dave
|