blob: 25ad762118d51e3936846430e0aff0dab280f2a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// Copyright 2018 The Fuchsia Authors
//
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT
#pragma once
// This is used by libc++'s <new> just for std::abort, ::posix_memalign, and
// ::free.
#include <stdlib.h>
#include <__config>
#define _LIBCPP_UNREACHABLE() __builtin_unreachable()
// This is used by the __libcpp_aligned_alloc inline. Since it always fails
// that inline will trivially always return nullptr.
inline int posix_memalign(void** ptr, size_t align, size_t size) { return 1; }
// This is used by the __libcpp_aligned_free inline, which won't really ever be
// called. The kernel does have a real free declared elsewhere.
void free(void* ptr);
_LIBCPP_BEGIN_NAMESPACE_STD
using ::abort;
_LIBCPP_END_NAMESPACE_STD
|