}
return null;
}
- protected void finalize() {
- destroy();
+ @Override
+ public void finalize() {
+ try {
+ nativeFinalize();
+ } catch (Throwable e) {
+ e.printStackTrace();
+ }
}
+ private native void nativeFinalize();
/* JNI / Native code */
/**
- * Bound the VM to a certain % of its vcpu capability (e.g. 75% of vm.getSpeed())
- * @param load percentage (between [0,100]
+ * Set a CPU bound for a given VM.
+ * @param bound in flops/s
*/
- public native void setBound(int load);
+ public native void setBound(double bound);
/**
* start the VM
public native void restore();
- /**
- * Destroy the VM
- */
- public native void destroy();
-
-
-
/**
* Class initializer, to initialize various JNI stuff
*/