针对Waldhauser提供的双差地震定位程序中使用静态数组致使内存浪费的情况,使用动态分配数组,按需分配内存,减少了内存的浪费.原程序最低内存需求1.4 G的地震定位示例,在改进程序中只需256 MB内存就可运行,且定位速度不变.
Considering that the double-difference relocation program provided by Waldhauser wastes lots of memories because of using static array, a new method to improve the program by use of dynamically allocatable array is presented. The example offered along with the programs can run on 256MB instead of 1. 4 GB memory with the same speed .