Crates.io | mos-alloc |
lib.rs | mos-alloc |
version | 0.2.0 |
source | src |
created_at | 2022-01-18 22:15:57.152946 |
updated_at | 2022-01-24 19:08:26.250131 |
description | allocator for mos architecture |
homepage | |
repository | https://github.com/mrk-its/mos-alloc |
max_upload_size | |
id | 516421 |
size | 23,468 |
mos-alloc
Allocator for mos-unknown-none
target (https://github.com/mrk-its/rust/tree/mos_target)
and number of utilities for setting max heap size / checking free / used memory
Full source code in examples/heap.rs.
#![no_std]
#![feature(start)]
#![feature(default_alloc_error_handler)]
extern crate alloc;
extern crate mos_alloc;
use alloc::{string::String, vec::Vec};
// ..
#[start]
fn main(_argc: isize, _argv: *const *const u8) -> isize {
// ..
let text = String::from("foo");
let data = (0..u16).collect::<Vec<_>>();
///
}
The easiest way is to use provided devcontainer.json
configuration for vscode:
Remote - Containers
extensionheap
example on mos-sim 6502 simulator do:
cargo run --example heap --release
All source code (including code snippets) is licensed under either of
Apache License, Version 2.0 (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.