summaryrefslogtreecommitdiff
path: root/lib/ktl/stub-new.cc
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-10-16 02:39:56 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-10-16 02:39:56 +0800
commit8cace3f05003c6cb4d38c36890055f03151c2ad4 (patch)
treeaa739deaac0266f17c4e91b333957501cb1ea2e9 /lib/ktl/stub-new.cc
parent3ad39e9878310e5317ee73c9b353c1e2c1c5c4ee (diff)
downloadlume-8cace3f05003c6cb4d38c36890055f03151c2ad4.tar.gz
lume-8cace3f05003c6cb4d38c36890055f03151c2ad4.tar.xz
Remove old code
Signed-off-by: Richard Qin <richard.qin.x@gmail.com>
Diffstat (limited to 'lib/ktl/stub-new.cc')
-rw-r--r--lib/ktl/stub-new.cc25
1 files changed, 0 insertions, 25 deletions
diff --git a/lib/ktl/stub-new.cc b/lib/ktl/stub-new.cc
deleted file mode 100644
index 919d941..0000000
--- a/lib/ktl/stub-new.cc
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2020 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
-
-#include <new>
-
-// std::stable_sort (used as ktl::stable_sort) uses std::get_temporary_buffer,
-// which uses operator new to request a temporary buffer but then works fine
-// if it can't get one. There is no "default" memory allocation in the
-// kernel, so just provide a stub operator new that always fails so
-// std::stable_sort falls back to its no-allocation algorithm.
-
-namespace std {
-
-const nothrow_t nothrow;
-
-} // namespace std
-
-void* operator new(std::size_t, const std::nothrow_t&) noexcept { return nullptr; }
-
-void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) noexcept {
- return nullptr;
-}