1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// ---------------- [ File: bitcoin-mem/src/malloc_usage.rs ]
crateix!;
/**
| Compute the total memory used by allocating
| alloc bytes.
|
-------------------
| Compute the memory used for dynamically
| allocated but owned data structures.
|
| For generic data types, this is *not*
| recursive. DynamicUsage(vector<vector<int>
| >) will compute the memory used for the
| vector<int>'s, but not for the ints
| inside.
|
| This is for efficiency reasons, as these
| functions are intended to be fast. If
| application data structures require
| more accurate inner accounting, they
| should iterate themselves, or use more
| efficient caching + updating on modification.
|
*/