Skip to content

Commit

Permalink
Merge pull request grpc#14458 from coryan/patch-1
Browse files Browse the repository at this point in the history
Fix typo in constant name.
  • Loading branch information
vjpai committed Mar 5, 2018
2 parents d8feec2 + b636f31 commit 5cb1c97
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/lib/gprpp/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,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)...);
Expand All @@ -45,7 +45,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);
Expand Down

0 comments on commit 5cb1c97

Please sign in to comment.