static WithSideValue evaluateWithResourceUse(IF0 f) { if (!threadAllocatedMemorySane()) ret -1; long time1 = nanoTime(); long value1 = bytesAllocatedByCurrentThread(); A a = f?!; long value2 = bytesAllocatedByCurrentThread(); long time2 = nanoTime(); ret withSideValue(FunctionResourceUse() .bytesAllocated(value2-value1) .runtime(nanosToSecondsObject(time2-time1)), a); }