![]() |
|
Scoped (i.e. More...
#include <mallocTag.h>
Public Member Functions | |
| StackOverride (StackState state) | |
| StackOverride (const StackOverride &)=delete | |
| StackOverride & | operator= (const StackOverride &)=delete |
Friends | |
| class | TfMallocTag |
Scoped (i.e.
local) object for temporarily replacing the current thread's tag stack with a different StackState.
This is typically used to bridge tag stacks in parallelism contexts. For example, a call site that spawns parallel tasks may capture its own tag stack state and pass it to the parallel tasks, that then use a StackOverride to ensure that memory allocations are billed to the same tags as the spawning thread. When StackOverride object is destroyed, the thread's previous tag stack is restored.
Definition at line 362 of file mallocTag.h.
|
inlineexplicit |
Definition at line 364 of file mallocTag.h.
|
inline |
Definition at line 372 of file mallocTag.h.
|
friend |
Definition at line 385 of file mallocTag.h.