Skip to content

Commit

Permalink
Set array size assuming -Xmx32m
Browse files Browse the repository at this point in the history
  • Loading branch information
melowe committed Apr 23, 2019
1 parent 40ff888 commit 797ee0c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void loadLarge() throws Exception {
Path largeFile = Paths.get(directory.toAbsolutePath().toString(), "loadLarge");

Random random = new Random();
byte[] data = new byte[Integer.MAX_VALUE - 8];
byte[] data = new byte[33554432];
random.nextBytes(data);
Files.write(largeFile, data);

Expand Down

0 comments on commit 797ee0c

Please sign in to comment.