Libraryless. Click here for Pure Java version (112L/1K).
1 | static simplyCached bool threadAllocatedMemorySane() { |
2 | monitorThreadAllocatedMemory(); |
3 | if (!threadAllocatedMemoryEnabled()) false; |
4 | long n = bytesAllocatedByCurrentThread(); |
5 | if (n <= 0) false; |
6 | int[] bla = new int[1024]; |
7 | if (bla == null) false; |
8 | if (bytesAllocatedByCurrentThread() <= n) false; |
9 | true; |
10 | } |
Began life as a copy of #1016749
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1031536 |
Snippet name: | threadAllocatedMemorySane - test if the bytesAllocatedByCurrentThread() is working |
Eternal ID of this version: | #1031536/5 |
Text MD5: | 2c032fe7776c09295ace9700c4022ae3 |
Transpilation MD5: | c546da05630f0db42b68e41125243144 |
Author: | stefan |
Category: | javax / monitoring |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-14 15:53:35 |
Source code size: | 326 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 159 / 229 |
Version history: | 4 change(s) |
Referenced in: | [show references] |