Extern definition can be made smaller

This commit is contained in:
Gwilym Kuiper 2021-08-16 21:04:37 +01:00
parent 7062610aba
commit 2bacbf35dc

View file

@ -2,11 +2,11 @@ use core::alloc::{GlobalAlloc, Layout};
use super::interrupt::Mutex;
fn get_data_end() -> usize {
extern "C" {
static __ewram_data_end: usize;
}
fn get_data_end() -> usize {
// TODO: This seems completely wrong, but without the &, rust generates
// a double dereference :/. Maybe a bug in nightly?
(unsafe { &__ewram_data_end }) as *const _ as usize