Skip to content

Commit

Permalink
Remove nightly-only custom allocator hook
Browse files Browse the repository at this point in the history
  • Loading branch information
hextraza committed Dec 14, 2023
1 parent 8c2cda1 commit 9b2b2d4
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,10 @@ use nimble::utils;
use clap::{load_yaml, App};
use std::collections::HashMap;
use std::path::Path;
use std::alloc::{Layout, set_alloc_error_hook};

use nimble::ALLOCATOR;

fn alloc_error_callback(layout: Layout) {
panic!("memory allocation of {} bytes failed\nallocation layout: {:?}\ncurrent allocated bytes: {}", layout.size(), layout, ALLOCATOR.allocated());
}

fn main() {
// Callback for responding to infallable memory allocation aborts
set_alloc_error_hook(alloc_error_callback);

let yaml = load_yaml!("cli.yml");

Expand Down

0 comments on commit 9b2b2d4

Please sign in to comment.