import java.util.*; import java.lang.management.*; import Dic.*; import Rea.*; class ExeSaveDic { public static void main(String args[]) { List lis = ManagementFactory.getMemoryPoolMXBeans(); for(int i=0; i< lis.size();i++) { System.out.println( lis.get(i).getName() +" "+ lis.get(i).getUsage().getUsed() ); } NGramDic dic = new NGramDic(); dic.create( new FileRead(args[0]) ); IndexData ind = dic.getIndex().IndexData(); dic.getIndex().saveFile(args[1]); System.out.println(ind.getSaveSize()); IndexData d= ind;//dic.getIndexData(); ind = dic.getIndex().searchIndexData("–²–ì"); System.out.println(ind.getName()+" "); lis = ManagementFactory.getMemoryPoolMXBeans(); for(int i=0; i< lis.size();i++) { System.out.println( lis.get(i).getName() +" "+ lis.get(i).getUsage().getUsed() ); } dic.getIndex().free();System.evacuate(); lis = ManagementFactory.getMemoryPoolMXBeans(); for(int i=0; i< lis.size();i++) { System.out.println( lis.get(i).getName() +" "+ lis.get(i).getUsage().getUsed() ); } } }