| Curiosity only: assigning array de-fragments memory? [message #52546] |
Tue, 13 February 2007 15:33 |
MarioIncandenza
Messages: 231 Registered: February 2005
|
Senior Member |
|
|
Just saw this, and thought, huh. Given that fragmented memory is not
much better than unavailable memory, maybe this is worth
investigating. Watch what happens after I repeat the assignment:
IDL> help,mask,a_2004
MASK UNDEFINED = <Undefined>
A_2004 FLOAT = Array[360, 180, 1464]
IDL> memtest
1048576 2146435072
Memory block # 1: 716 Mb (total: 716 Mb)
Memory block # 2: 185 Mb (total: 901 Mb)
Memory block # 3: 180 Mb (total: 1081 Mb)
Memory block # 4: 165 Mb (total: 1246 Mb)
Memory block # 5: 90 Mb (total: 1336 Mb)
IDL> mask=byte(a_2004*0)
IDL> memtest
1048576 2146435072
Memory block # 1: 716 Mb (total: 716 Mb)
Memory block # 2: 185 Mb (total: 901 Mb)
Memory block # 3: 165 Mb (total: 1066 Mb)
Memory block # 4: 90 Mb (total: 1156 Mb)
Memory block # 5: 89 Mb (total: 1245 Mb)
IDL> mask=byte(a_2004*0)
IDL> memtest
1048576 2146435072
Memory block # 1: 361 Mb (total: 361 Mb)
Memory block # 2: 264 Mb (total: 625 Mb)
Memory block # 3: 185 Mb (total: 810 Mb)
Memory block # 4: 180 Mb (total: 990 Mb)
Memory block # 5: 165 Mb (total: 1155 Mb)
Memory block # 6: 90 Mb (total: 1245 Mb)
IDL> mask=byte(a_2004*0)
IDL> memtest
1048576 2146435072
Memory block # 1: 716 Mb (total: 716 Mb)
Memory block # 2: 185 Mb (total: 901 Mb)
Memory block # 3: 165 Mb (total: 1066 Mb)
Memory block # 4: 90 Mb (total: 1156 Mb)
Memory block # 5: 89 Mb (total: 1245 Mb)
|
|
|
|