Libraryless. Click here for Pure Java version (3035L/18K).
1 | svoid test_memLimit() { |
2 | assertEqualsVerbose("hello", memLimit(megabytes(10), () -> "hello")); |
3 | assertFailVerbose(r { memLimit(megabytes(10), () -> { |
4 | int[] bla = new int[10000000]; |
5 | ping(); |
6 | ret bla; |
7 | }); }); |
8 | } |
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1031539 |
Snippet name: | test_memLimit |
Eternal ID of this version: | #1031539/1 |
Text MD5: | 69e44771b4dc9fcf7c8a55bd67127df2 |
Transpilation MD5: | f97a4e7baac8cdeb67f21150a6ea2670 |
Author: | stefan |
Category: | javax / sandboxing |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-06-20 05:05:27 |
Source code size: | 230 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 136 / 194 |
Referenced in: | [show references] |