summaryrefslogtreecommitdiffstats
path: root/libcxx/include/__sso_allocator
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/__sso_allocator')
-rw-r--r--libcxx/include/__sso_allocator4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/include/__sso_allocator b/libcxx/include/__sso_allocator
index 40027363a18..e16b680ec55 100644
--- a/libcxx/include/__sso_allocator
+++ b/libcxx/include/__sso_allocator
@@ -57,12 +57,12 @@ public:
}
return static_cast<pointer>(_VSTD::__libcpp_allocate(__n * sizeof(_Tp), __alignof(_Tp)));
}
- _LIBCPP_INLINE_VISIBILITY void deallocate(pointer __p, size_type)
+ _LIBCPP_INLINE_VISIBILITY void deallocate(pointer __p, size_type __n)
{
if (__p == (pointer)&buf_)
__allocated_ = false;
else
- _VSTD::__libcpp_deallocate(__p, __alignof(_Tp));
+ _VSTD::__libcpp_deallocate(__p, __n * sizeof(_Tp), __alignof(_Tp));
}
_LIBCPP_INLINE_VISIBILITY size_type max_size() const throw() {return size_type(~0) / sizeof(_Tp);}
OpenPOWER on IntegriCloud