kernel: Added operator delete(ptr, nothrow_t)
* This seems to be required when building the DriveEncryption kernel driver with gcc 11.2 on x86-64, at least. Change-Id: Ie1ae09435dd912021957e64d4b9a3e7b05913c33 Reviewed-on: https://review.haiku-os.org/c/haiku/+/5742 Tested-by: Commit checker robot <[email protected]> Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
2c563c4c9b
commit
97739603d1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright 2003-2004, Axel Dörfler, [email protected].
|
||||
* Copyright 2004-2018, Haiku, Inc. All rights reserved.
|
||||
* Copyright 2003-2022, Axel Dörfler, [email protected].
|
||||
* Copyright 2004-2022, Haiku, Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _KERNEL_UTIL_KERNEL_CPP_H
|
||||
@@ -36,6 +36,7 @@ extern void* operator new(size_t size, const mynothrow_t &) _NOEXCEPT;
|
||||
extern void* operator new[](size_t size, const mynothrow_t &) _NOEXCEPT;
|
||||
extern void operator delete(void *ptr) _NOEXCEPT;
|
||||
extern void operator delete[](void *ptr) _NOEXCEPT;
|
||||
extern void operator delete(void *ptr, const std::nothrow_t &) _NOEXCEPT;
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
extern void operator delete(void* ptr, std::size_t) _NOEXCEPT;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2007, Haiku Inc. All rights reserved.
|
||||
* Copyright 2003-2022, Haiku Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
@@ -7,6 +7,7 @@
|
||||
* Ingo Weinhold, [email protected].
|
||||
*/
|
||||
|
||||
|
||||
//! C++ in the kernel
|
||||
|
||||
|
||||
@@ -142,6 +143,13 @@ operator delete[](void *ptr) _NOEXCEPT
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
operator delete(void *ptr, std::nothrow_t const &) _NOEXCEPT
|
||||
{
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
|
||||
#if __cplusplus >= 201402L
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user