diff options
author | Dmitri Gribenko <dmitrig@google.com> | 2023-12-11 09:07:07 -0800 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-12-11 09:07:59 -0800 |
commit | 55621d1af55be7bf9a2c8e5dcef4368d9a6d4e51 (patch) | |
tree | 4c0e74b9a45b8875e35ee543089315a0d9989df1 /absl/strings/cord_analysis.h | |
parent | fad946221cec37175e762c399760f54b9de9a9fa (diff) |
Add nullability annotations
PiperOrigin-RevId: 589842893
Change-Id: I9657761d1f71c665582406f278c6605f6d382f6d
Diffstat (limited to 'absl/strings/cord_analysis.h')
-rw-r--r-- | absl/strings/cord_analysis.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/absl/strings/cord_analysis.h b/absl/strings/cord_analysis.h index 9b9527a5..f8ce3489 100644 --- a/absl/strings/cord_analysis.h +++ b/absl/strings/cord_analysis.h @@ -19,6 +19,7 @@ #include <cstdint> #include "absl/base/config.h" +#include "absl/base/nullability.h" #include "absl/strings/internal/cord_internal.h" namespace absl { @@ -28,7 +29,7 @@ namespace cord_internal { // Returns the *approximate* number of bytes held in full or in part by this // Cord (which may not remain the same between invocations). Cords that share // memory could each be "charged" independently for the same shared memory. -size_t GetEstimatedMemoryUsage(const CordRep* rep); +size_t GetEstimatedMemoryUsage(absl::Nonnull<const CordRep*> rep); // Returns the *approximate* number of bytes held in full or in part by this // Cord for the distinct memory held by this cord. This is similar to @@ -46,13 +47,13 @@ size_t GetEstimatedMemoryUsage(const CordRep* rep); // // This is more expensive than `GetEstimatedMemoryUsage()` as it requires // deduplicating all memory references. -size_t GetMorePreciseMemoryUsage(const CordRep* rep); +size_t GetMorePreciseMemoryUsage(absl::Nonnull<const CordRep*> rep); // Returns the *approximate* number of bytes held in full or in part by this // CordRep weighted by the sharing ratio of that data. For example, if some data // edge is shared by 4 different Cords, then each cord is attribute 1/4th of // the total memory usage as a 'fair share' of the total memory usage. -size_t GetEstimatedFairShareMemoryUsage(const CordRep* rep); +size_t GetEstimatedFairShareMemoryUsage(absl::Nonnull<const CordRep*> rep); } // namespace cord_internal ABSL_NAMESPACE_END |