Skip to content

Commit

Permalink
Merge pull request #1 from byfnoel/fix-cargo-filename
Browse files Browse the repository at this point in the history
Fix cargo filename
  • Loading branch information
XiangYyang authored Apr 29, 2024
2 parents 29d8dd9 + ef3dbd2 commit 57fd702
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
File renamed without changes.
14 changes: 7 additions & 7 deletions src/heap.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
| embed Heap
| 文件名称: heap.rs
| 文件作用: C程序的包装
Expand Down Expand Up @@ -34,16 +34,16 @@
//! wrapper for C implement
/// # Allocate memory
///
///
/// Allocate memory in heap.
///
///
/// ## Arguments
///
///
/// * `size`: need size, bytes
/// * `align`: memory alignment, bytes
///
///
/// ## Return Value
///
///
/// If succeeded, this function will return the start pointer for the block,
/// and if failed, it will return `None`.
pub fn allocate(size: usize, align: usize) -> Option<*mut u8> {
Expand All @@ -61,7 +61,7 @@ pub fn free(ptr: *mut u8) {
}

/// # Initialize heap
///
///
/// Initialize heap, it will initialize the free list in heap memory.
pub fn init() {
unsafe { emheap_impl_Heap_Init() };
Expand Down
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@
OTHER DEALINGS IN THE SOFTWARE.
*/
//! # emheap
//!
//!
//! The `emheap` crate is a very simple memory manager for embedded systems and microprocessors.
//!
//!
//! Here are the main features:
//!
//!
//! 1. small: total no more than 350 lines of code.
//! 2. fragmentation collection:
//! the programming will merge the closest memory block to avoid fragmentation.
//! 3. cross-platform: it does not rely on any libraries.
//! 4. memory alignment: support memory alignment.
//!
//!
//! WARNING: **DO NOT** use this library on your PC.
//!
#![cfg_attr(not(test), no_std)]
Expand Down
3 changes: 1 addition & 2 deletions src/rsalloc.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
| embed Heap
| 文件名称: rsalloc.rs
| 文件作用: Rust的分配器实现
Expand Down Expand Up @@ -53,4 +53,3 @@ unsafe impl GlobalAlloc for Allocator {
heap::free(ptr);
}
}

0 comments on commit 57fd702

Please sign in to comment.