//===----------------------------------------------------------------------===//
#include <__memory/aligned_alloc.h>
+#include <cstdlib>
#include <new>
-#include <stdlib.h>
namespace std
{
if (size == 0)
size = 1;
void* p;
- while ((p = ::malloc(size)) == nullptr)
+ while ((p = std::malloc(size)) == nullptr)
{
// If malloc fails and there is a new_handler,
// call it to try free up memory.
void
operator delete(void* ptr) noexcept
{
- ::free(ptr);
+ std::free(ptr);
}
_LIBCPP_WEAK
if (size == 0)
size = 1;
void* p;
- while ((p = ::malloc(size)) == nullptr)
+ while ((p = std::malloc(size)) == nullptr)
{
// If malloc fails and there is a new_handler,
// call it to try free up memory.
void
operator delete(void* ptr) noexcept
{
- ::free(ptr);
+ std::free(ptr);
}
_LIBCPP_WEAK