Java_test.java /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */package MEM_ECC;//syslibimport java.util.*;//
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package MEM_ECC; //syslib import java.util.*; //mylib /** * * @author avatu */ public class Java_test { public static void main(String[] args) { // write your code here final long initSeed=1L; final long initGap=3L; final int initVol=1024*1024*100;//不要设的太小避免MAXLEN超过int.maxVal final long MB=1048576L; final long dataUnitSize=((long)initVol)*8L; System.out.println("DataUnitSize:"+dataUnitSize+"Bytes"); final long freeMem=getFreeMem(); System.out.println("FreeVMsize:"+freeMem+"Bytes"); int MAXLEN=(int)(freeMem/dataUnitSize); System.out.println("Total Dataunit count:"+MAXLEN); MAXLEN=MAXLEN-3; System.out.println("final Data unit count:"+MAXLEN); long[] initData=dataItemBuilder_long(initSeed,initGap,initVol); //init Test object: /* Hashtable testObj=new Hashtable(); for(long i=0;iJava_test2.java /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package MEM_ECC; //syslib import java.util.*; //mylib /** * * @author avatu */ public class Java_test { public static void main(String[] args) { // write your code here final long initSeed=1L; final long initGap=3L; final int initVol=1024*1024*100;//不要设的太小避免MAXLEN超过int.maxVal final long MB=1048576L; final long dataUnitSize=((long)initVol)*8L; System.out.println("DataUnitSize:"+dataUnitSize+"Bytes"); final long freeMem=getFreeMem(); System.out.println("FreeVMsize:"+freeMem+"Bytes"); int MAXLEN=(int)(freeMem/dataUnitSize); System.out.println("Total Dataunit count:"+MAXLEN); MAXLEN=MAXLEN-3; System.out.println("final Data unit count:"+MAXLEN); long[] initData=dataItemBuilder_long(initSeed,initGap,initVol); //init Test object: /* Hashtable testObj=new Hashtable(); for(long i=0;i