public final void garbage_collection()
{
 long high=(long)( (float)cachesize*(float)highmark/100f);
 if(cachedir.readonly==true)
 {
	 System.out.println(new Date()+" Cache directory is in READ-ONLY mode, GC Aborted.\n"+new Date()+"\tYou can use -fakegc instead");
	 return;
 }
 
 if(gcloglevel>1) print_gc_intro();
 oursize=high+1;

 while(oursize>high)
 {
    oursize=0;
    ourfiles=0;
    ourdirs=0;
    gcarray=new cacheobject[gcarray.length];
    gcvalues=new float[gcvalues.length];
    gclow=0;
    gcused=0;
    scandel=0;
    if(gcloglevel>0) System.out.println(new Date()+" Scanning cache directory. This takes some time...");
    scan_cache(root);
    if(scandel>0 && gcloglevel>0) System.out.println(new Date()+" "+scandel+" files deleted during scan.");
    if(gcloglevel>1) print_gc_outro();
    delete_files();
 }
}