@@ -31,18 +31,18 @@ Token Assignment Mode
31
31
32
32
The default mode to calculate tokens is:
33
33
34
- * * TypeHash * (mode=2) : This mode assigns a token ID based on the hash of
35
- the allocated type's name.
34
+ * `` typehash `` : This mode assigns a token ID based on the hash of the allocated
35
+ type's name.
36
36
37
37
Other token ID assignment modes are supported, but they may be subject to
38
38
change or removal. These may (experimentally) be selected with ``-mllvm
39
39
-alloc-token-mode=<mode> ``:
40
40
41
- * * Random * (mode=1) : This mode assigns a statically-determined random token ID
42
- to each allocation site.
41
+ * `` random `` : This mode assigns a statically-determined random token ID to each
42
+ allocation site.
43
43
44
- * * Increment * (mode=0) : This mode assigns a simple, incrementally increasing
45
- token ID to each allocation site.
44
+ * `` increment `` : This mode assigns a simple, incrementally increasing token ID
45
+ to each allocation site.
46
46
47
47
Allocation Token Instrumentation
48
48
================================
@@ -69,7 +69,7 @@ In addition, it is typically recommended to configure the following:
69
69
70
70
* ``-falloc-token-max=<N> ``
71
71
Configures the maximum number of tokens. No max by default (tokens bounded
72
- by ``UINT64_MAX ``).
72
+ by ``SIZE_MAX ``).
73
73
74
74
.. code-block :: console
75
75
@@ -80,21 +80,21 @@ Runtime Interface
80
80
81
81
A compatible runtime must be provided that implements the token-enabled
82
82
allocation functions. The instrumentation generates calls to functions that
83
- take a final ``uint64_t token_id `` argument.
83
+ take a final ``size_t token_id `` argument.
84
84
85
85
.. code-block :: c
86
86
87
87
// C standard library functions
88
- void *__alloc_token_malloc(size_t size, uint64_t token_id);
89
- void *__alloc_token_calloc(size_t count, size_t size, uint64_t token_id);
90
- void *__alloc_token_realloc(void *ptr, size_t size, uint64_t token_id);
88
+ void *__alloc_token_malloc(size_t size, size_t token_id);
89
+ void *__alloc_token_calloc(size_t count, size_t size, size_t token_id);
90
+ void *__alloc_token_realloc(void *ptr, size_t size, size_t token_id);
91
91
// ...
92
92
93
93
// C++ operators (mangled names)
94
- // operator new(size_t, uint64_t )
95
- void *__alloc_token_Znwm(size_t size, uint64_t token_id);
96
- // operator new[](size_t, uint64_t )
97
- void *__alloc_token_Znam(size_t size, uint64_t token_id);
94
+ // operator new(size_t, size_t )
95
+ void *__alloc_token_Znwm(size_t size, size_t token_id);
96
+ // operator new[](size_t, size_t )
97
+ void *__alloc_token_Znam(size_t size, size_t token_id);
98
98
// ... other variants like nothrow, etc., are also instrumented.
99
99
100
100
Fast ABI
0 commit comments