1 | static Map<Class, Long> cumulativeObjectSizeByClass(Iterable l) { |
2 | new Map<Class, Long> map; |
3 | fOr (O o : l) { |
4 | continue if o == null; |
5 | Class c = o.getClass(); |
6 | map.put(c, toLong(map.get(c)) + unsafe_sizeOf2(o)); |
7 | } |
8 | ret map; |
9 | } |
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1024097 |
Snippet name: | cumulativeObjectSizeByClass |
Eternal ID of this version: | #1024097/2 |
Text MD5: | 97de440ca83e1787a0e890780e22a0fa |
Author: | stefan |
Category: | javax / html |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-07-20 19:02:05 |
Source code size: | 247 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 166 / 203 |
Version history: | 1 change(s) |
Referenced in: | [show references] |