mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
f86e6f8eb0
The STL says that these should be replaceable by user code. new.cc now defines only a few direct functions (including a free wrapper that perplexingly is needed since g++ didn’t want to alias "free".) Now, all of the operators are weak references to those functions.
34 lines
1 KiB
C++
34 lines
1 KiB
C++
// -*-mode:c++;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8-*-
|
|
// vi: set et ft=cpp ts=4 sts=4 sw=4 fenc=utf-8 :vi
|
|
#ifndef COSMOPOLITAN_CTL_NEW_H_
|
|
#define COSMOPOLITAN_CTL_NEW_H_
|
|
|
|
namespace ctl {
|
|
|
|
enum class align_val_t : size_t
|
|
{
|
|
};
|
|
|
|
} // namespace ctl
|
|
|
|
void* operator new(size_t);
|
|
void* operator new[](size_t);
|
|
void* operator new(size_t, ctl::align_val_t);
|
|
void* operator new[](size_t, ctl::align_val_t);
|
|
|
|
// XXX clang-format currently mutilates these for some reason.
|
|
// clang-format off
|
|
|
|
void* operator new(size_t, void*);
|
|
void* operator new[](size_t, void*);
|
|
|
|
void operator delete(void*) noexcept;
|
|
void operator delete[](void*) noexcept;
|
|
void operator delete(void*, ctl::align_val_t) noexcept;
|
|
void operator delete[](void*, ctl::align_val_t) noexcept;
|
|
void operator delete(void*, size_t) noexcept;
|
|
void operator delete[](void*, size_t) noexcept;
|
|
void operator delete(void*, size_t, ctl::align_val_t) noexcept;
|
|
void operator delete[](void*, size_t, ctl::align_val_t) noexcept;
|
|
|
|
#endif // COSMOPOLITAN_CTL_NEW_H_
|