@ -1,5 +1,4 @@
|
||||
use std::alloc::Layout;
|
||||
use std::fmt;
|
||||
use std::{alloc::Layout, fmt};
|
||||
|
||||
/// Based loosely on the unstable std::alloc::Alloc trait
|
||||
pub trait Alloc {
|
||||
|
@ -7,12 +7,14 @@ use solana_rbpf::{
|
||||
memory_region::{translate_addr, MemoryRegion},
|
||||
EbpfVm,
|
||||
};
|
||||
use std::alloc::Layout;
|
||||
use std::ffi::CStr;
|
||||
use std::io::{Error, ErrorKind};
|
||||
use std::mem;
|
||||
use std::slice::from_raw_parts;
|
||||
use std::str::from_utf8;
|
||||
use std::{
|
||||
alloc::Layout,
|
||||
ffi::CStr,
|
||||
io::{Error, ErrorKind},
|
||||
mem,
|
||||
slice::from_raw_parts,
|
||||
str::from_utf8,
|
||||
};
|
||||
|
||||
/// Program heap allocators are intended to allocate/free from a given
|
||||
/// chunk of memory. The specific allocator implementation is
|
||||
|
@ -14,10 +14,11 @@ use solana_sdk::{
|
||||
pubkey::Pubkey,
|
||||
sysvar::rent,
|
||||
};
|
||||
use std::convert::TryFrom;
|
||||
use std::io::prelude::*;
|
||||
use std::io::Error;
|
||||
use std::mem;
|
||||
use std::{
|
||||
convert::TryFrom,
|
||||
io::{prelude::*, Error},
|
||||
mem,
|
||||
};
|
||||
|
||||
solana_sdk::declare_program!(
|
||||
solana_sdk::bpf_loader::ID,
|
||||
|
Reference in New Issue
Block a user