summaryrefslogtreecommitdiffhomepage
path: root/include/LibC++/new.h
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2026-01-09 02:31:16 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2026-01-09 02:31:16 +0100
commit365e1851ab1b2f2e7eca2fb0697e5b7ff1023b60 (patch)
tree4f82da02b080a6de9ba0756bf1f21c319569831f /include/LibC++/new.h
parent3550c29636d9a46f40d02908605144221bb7eb9b (diff)
chore: Nectar grunt work on runtime library and test code.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'include/LibC++/new.h')
-rw-r--r--include/LibC++/new.h67
1 files changed, 0 insertions, 67 deletions
diff --git a/include/LibC++/new.h b/include/LibC++/new.h
deleted file mode 100644
index f7e3abb..0000000
--- a/include/LibC++/new.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org)
-// Licensed under the Apache License, Version 2.0 (See accompanying
-// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0)
-// Official repository: https://github.com/nekernel-org/nectar
-
-#ifndef NECTAR_LIBCXX_NEW_H
-#define NECTAR_LIBCXX_NEW_H
-
-#include <defines>
-
-namespace std {
-struct nothrow_t final {
- explicit nothrow_t() = default;
- ~nothrow_t() = default;
-};
-
-struct placement_t final {
- explicit placement_t() = default;
- ~placement_t() = default;
-
- void* __base{};
- int32_t __align{};
- size_t __size{};
-};
-} // namespace std
-
-// AMLALE: Define the placement_t feature.
-#ifndef __cpp_has_placement
-#define __cpp_has_placement 1
-#endif
-
-// AMLALE: Define nothrow
-#ifndef __cpp_has_nothrow
-#define __cpp_has_nothrow 1
-#endif
-
-void* operator new(size_t);
-void* operator new[](size_t);
-
-/// \brief placement_t new and delete operators. Governs how the memory shall be placed.
-/// \note This is a feature that shall be used wisely, failure to do so will produce Undefined
-/// Behaviors at runtime.
-void* operator _placement_new(struct placement_t*);
-void operator _placement_delete(struct placement_t*, void*);
-
-/// \brief For all offsets within the base range and alignement 'align'
-/// \brief Allocate offsets with respect to the `base` interval, apply alignement of `align` value.
-/// Return `offsets` of length n as an aligned value within the domain of `base`.
-using placeable_callable_type = void* /*offsets*/ (*) (void* base, size_t n, const int& align);
-
-/// \note This should NOT fail, failure to meet the conditions will cause the program's state to be
-/// aborted.
-/// \brief Set the placement policy of future memory allocations.
-template <class PlaceableCallable>
-void set_placement_policy(const PlaceableCallable&) noexcept;
-
-void* operator new(size_t, const nothrow_t&) noexcept;
-void* operator new(size_t, void*) noexcept;
-void* operator new[](size_t, const nothrow_t&) noexcept;
-void* operator new[](size_t, void*) noexcept;
-
-void operator delete(void*) noexcept;
-void operator delete(void*, size_t) noexcept;
-
-void operator delete[](void*) noexcept;
-
-#endif // NECTAR_LIBCXX_NEW_H