File tree 3 files changed +15
-6
lines changed
3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
7
7
8
8
## [ Unreleased]
9
9
10
+ ## [ v0.3.1] - 2017-10-07
11
+
12
+ ### Fixed
13
+
14
+ - The example in the documentation.
15
+
10
16
## [ v0.3.0] - 2017-10-07
11
17
12
18
### Changed
@@ -39,7 +45,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
39
45
40
46
- Initial version of the allocator
41
47
42
- [ Unreleased ] : https://github.com/japaric/alloc-cortex-m/compare/v0.3.0...HEAD
48
+ [ Unreleased ] : https://github.com/japaric/alloc-cortex-m/compare/v0.3.1...HEAD
49
+ [ v0.3.1 ] : https://github.com/japaric/alloc-cortex-m/compare/v0.3.0...v0.3.1
43
50
[ v0.3.0 ] : https://github.com/japaric/alloc-cortex-m/compare/v0.2.2...v0.3.0
44
51
[ v0.2.2 ] : https://github.com/japaric/alloc-cortex-m/compare/v0.2.1...v0.2.2
45
52
[ v0.2.1 ] : https://github.com/japaric/alloc-cortex-m/compare/v0.2.0...v0.2.1
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ keywords = [
12
12
]
13
13
license = " MIT OR Apache-2.0"
14
14
name = " alloc-cortex-m"
15
- version = " 0.3.0 "
15
+ version = " 0.3.1 "
16
16
17
17
[dependencies ]
18
18
cortex-m = " 0.1.5"
Original file line number Diff line number Diff line change 15
15
//!
16
16
//! // These symbols come from a linker script
17
17
//! extern "C" {
18
- //! static mut _heap_start: usize ;
19
- //! static mut _heap_end: usize ;
18
+ //! static mut _sheap: u32 ;
19
+ //! static mut _eheap: u32 ;
20
20
//! }
21
21
//!
22
22
//! #[no_mangle]
23
23
//! pub fn main() -> ! {
24
24
//! // Initialize the heap BEFORE you use the allocator
25
- //! unsafe { ALLOCATOR.init(_heap_start, _heap_end - _heap_start) }
25
+ //! let start = unsafe { &mut _sheap as *mut u32 as usize };
26
+ //! let end = unsafe { &mut _sheap as *mut u32 as usize };
27
+ //! unsafe { ALLOCATOR.init(start, end - start) }
26
28
//!
27
29
//! let mut xs = Vec::new();
28
30
//! xs.push(1);
@@ -108,4 +110,4 @@ unsafe impl<'a> Alloc for &'a CortexMHeap {
108
110
unsafe fn dealloc ( & mut self , ptr : * mut u8 , layout : Layout ) {
109
111
self . heap . lock ( |heap| heap. deallocate ( ptr, layout) ) ;
110
112
}
111
- }
113
+ }
You can’t perform that action at this time.
0 commit comments