diff options
author | 2018-02-19 15:02:43 -0500 | |
---|---|---|
committer | 2018-02-19 15:02:43 -0500 | |
commit | b636f3134ef43a32919f1133f69d780165962625 (patch) | |
tree | 3c81a9fe44a788e506017cdae66e8fdb26f3f29c /src/core/lib/gprpp/memory.h | |
parent | 9a5a3883f59d8d3d5d25ffd4337ca150d97e2e38 (diff) |
Fix typo in constant name.
s/Allignment/Alignment/ (not the double-l).
Diffstat (limited to 'src/core/lib/gprpp/memory.h')
-rw-r--r-- | src/core/lib/gprpp/memory.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/lib/gprpp/memory.h b/src/core/lib/gprpp/memory.h index f7cd6424af..646c135513 100644 --- a/src/core/lib/gprpp/memory.h +++ b/src/core/lib/gprpp/memory.h @@ -28,12 +28,12 @@ namespace grpc_core { // The alignment of memory returned by gpr_malloc(). -constexpr size_t kAllignmentForDefaultAllocationInBytes = 8; +constexpr size_t kAlignmentForDefaultAllocationInBytes = 8; // Alternative to new, since we cannot use it (for fear of libstdc++) template <typename T, typename... Args> inline T* New(Args&&... args) { - void* p = alignof(T) > kAllignmentForDefaultAllocationInBytes + void* p = alignof(T) > kAlignmentForDefaultAllocationInBytes ? gpr_malloc_aligned(sizeof(T), alignof(T)) : gpr_malloc(sizeof(T)); return new (p) T(std::forward<Args>(args)...); @@ -43,7 +43,7 @@ inline T* New(Args&&... args) { template <typename T> inline void Delete(T* p) { p->~T(); - if (alignof(T) > kAllignmentForDefaultAllocationInBytes) { + if (alignof(T) > kAlignmentForDefaultAllocationInBytes) { gpr_free_aligned(p); } else { gpr_free(p); |