From cd8d08816626a79ea3c61096ca6d0ffd4bad2602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonard=20K=C3=B6nig?= <leonard.koenig@fu-berlin.de> Date: Tue, 30 Jun 2020 13:28:35 +0200 Subject: [PATCH] remove custom alloc error handler --- src/allocator.rs | 16 ---------------- src/main.rs | 2 -- 2 files changed, 18 deletions(-) diff --git a/src/allocator.rs b/src/allocator.rs index bd8ebbe..fd8704c 100644 --- a/src/allocator.rs +++ b/src/allocator.rs @@ -87,19 +87,3 @@ unsafe impl GlobalAlloc for TockAllocator { #[global_allocator] static ALLOCATOR: TockAllocator = TockAllocator::new(); - -#[cfg(not(feature = "custom_alloc_error_handler"))] -#[alloc_error_handler] -unsafe fn alloc_error_handler(_: Layout) -> ! { - use crate::syscalls; - - // Print 0x01 using the LowLevelDebug capsule (if available). - let _ = syscalls::command1_insecure(8, 2, 0x01); - - // Signal a panic using the LowLevelDebug capsule (if available). - let _ = syscalls::command1_insecure(8, 1, 0x01); - - loop { - syscalls::raw::yieldk(); - } -} diff --git a/src/main.rs b/src/main.rs index edadf4c..38ddbfe 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,8 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -#![feature(alloc_error_handler)] - #![cfg_attr(not(feature = "std"), no_std)] #[macro_use] -- GitLab