Skip to content

Commit

Permalink
use hello world in a loop to show memory usage
Browse files Browse the repository at this point in the history
  • Loading branch information
king6cong committed Apr 23, 2018
1 parent e3e8000 commit 4bedfbb
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions example/HelloWorld.java
Expand Up @@ -13,21 +13,10 @@ class HelloWorld {
}

public static void main(String[] args) {
String output = HelloWorld.hello("josh");
System.out.println(output);

HelloWorld.factAndCallMeBack(6, new HelloWorld());

long counter_ptr = counterNew(new HelloWorld());

for (int i = 0; i < 5; i++) {
counterIncrement(counter_ptr);
while (true) {
String output = HelloWorld.hello("josh");
System.out.println(output);
}

counterDestroy(counter_ptr);

System.out.println("Invoking asyncComputation (thread id = " + Thread.currentThread().getId() + ")");
asyncComputation(new HelloWorld());
}

public void factCallback(int res) {
Expand Down

0 comments on commit 4bedfbb

Please sign in to comment.