Skip to content

Commit

Permalink
Update MeeseeksResource.java
Browse files Browse the repository at this point in the history
  • Loading branch information
panderm committed Nov 10, 2021
1 parent 8f782af commit 87b76fd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/org/fabdouglas/meeseeks/MeeseeksResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public void mem(@RequestParam(name = "millis", required = false, defaultValue =
throws InterruptedException {
// allocate memory
ArrayList<String> mem = new ArrayList<String>();
System.out.println("Allocate about " + nb + " Kilobytes of RAM");
for(long i=0L; i<nb; i++) {
// allocate about 1K of memory
for(int j=0; j<20; j++) {
Expand All @@ -107,6 +108,7 @@ public void mem(@RequestParam(name = "millis", required = false, defaultValue =
}
}
// keep the memory for some time
System.out.println("Sleeping for " + millis + " milliseconds");
TimeUnit.MILLISECONDS.sleep(millis);
}

Expand Down

0 comments on commit 87b76fd

Please sign in to comment.