mirror of
https://github.com/esp-rs/esp-hal.git
synced 2025-09-30 05:40:39 +00:00
Fix problem of not de-allocating memory in some situations (#3949)
* Fix problem of not de-allocating memory in some situations * CHANGELOG.md
This commit is contained in:
parent
ef496a44da
commit
c1c2d04124
@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix problem of not de-allocating memory in some situations (#3949)
|
||||
|
||||
### Removed
|
||||
|
||||
|
@ -30,7 +30,7 @@ unsafe impl Allocator for EspHeap {
|
||||
|
||||
unsafe fn deallocate(&self, ptr: NonNull<u8>, layout: Layout) {
|
||||
unsafe {
|
||||
crate::HEAP.dealloc(ptr.as_ptr(), layout);
|
||||
self.dealloc(ptr.as_ptr(), layout);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -45,7 +45,7 @@ unsafe impl CoreAllocator for EspHeap {
|
||||
|
||||
unsafe fn deallocate(&self, ptr: NonNull<u8>, layout: Layout) {
|
||||
unsafe {
|
||||
crate::HEAP.dealloc(ptr.as_ptr(), layout);
|
||||
self.dealloc(ptr.as_ptr(), layout);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user