diff options
author | Dave MacLachlan <dmaclach@google.com> | 2023-03-09 09:10:29 -0800 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-03-09 09:11:33 -0800 |
commit | 5df3ac3b29927d4d64faf81fcc88ec25b076af9d (patch) | |
tree | 674b8ea15db928b8a860f9863a55e14b312b9c82 /absl/base/internal | |
parent | d5d287dc28f0f3cef52928e9e8fe6f29f6577d63 (diff) |
Add note about using `CurrentThreadIdentityIfPresent()` on darwin based platforms.
PiperOrigin-RevId: 515353041
Change-Id: I2c88022d50a3351f70d09a2d63020470889752d9
Diffstat (limited to 'absl/base/internal')
-rw-r--r-- | absl/base/internal/thread_identity.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/absl/base/internal/thread_identity.h b/absl/base/internal/thread_identity.h index 463acbc7..b99c9575 100644 --- a/absl/base/internal/thread_identity.h +++ b/absl/base/internal/thread_identity.h @@ -170,7 +170,10 @@ struct ThreadIdentity { // // Does not malloc(*), and is async-signal safe. // [*] Technically pthread_setspecific() does malloc on first use; however this -// is handled internally within tcmalloc's initialization already. +// is handled internally within tcmalloc's initialization already. Note that +// darwin does *not* use tcmalloc, so this can catch you if using MallocHooks +// on Apple platforms. Whatever function is calling your MallocHooks will need +// to watch for recursion on Apple platforms. // // New ThreadIdentity objects can be constructed and associated with a thread // by calling GetOrCreateCurrentThreadIdentity() in per-thread-sem.h. |