Skip to content

Commit 8c9b70e

Browse files
paging::FrameAllocator: remove #[track_caller]
Signed-off-by: Andy-Python-Programmer <andypythonappdeveloper@gmail.com>
1 parent 48bd19a commit 8c9b70e

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

src/aero_kernel/src/mem/paging/frame.rs

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,7 @@ impl LockedFrameAllocator {
8181
}
8282

8383
unsafe impl FrameAllocator<Size4KiB> for LockedFrameAllocator {
84-
#[track_caller]
8584
fn allocate_frame(&self) -> Option<PhysFrame<Size4KiB>> {
86-
// let caller = core::panic::Location::caller();
87-
// log::debug!("allocation request of 4KiB by {:?}", caller);
88-
8985
self.0.get().map(|m| {
9086
m.lock_irq()
9187
.allocate_frame_inner(order_from_size(Size4KiB::SIZE))
@@ -97,46 +93,34 @@ unsafe impl FrameAllocator<Size4KiB> for LockedFrameAllocator {
9793
})?
9894
}
9995

100-
#[track_caller]
10196
fn deallocate_frame(&self, frame: PhysFrame<Size4KiB>) {
102-
// let caller = core::panic::Location::caller();
103-
// log::debug!("deallocation request of 4KiB by {:?}", caller);
104-
10597
self.0
10698
.get()
10799
.map(|m| {
108100
m.lock_irq()
109101
.deallocate_frame_inner(frame.start_address(), order_from_size(Size4KiB::SIZE))
110102
})
111-
.unwrap_or(());
103+
.unwrap()
112104
}
113105
}
114106

115107
unsafe impl FrameAllocator<Size2MiB> for LockedFrameAllocator {
116-
#[track_caller]
117108
fn allocate_frame(&self) -> Option<PhysFrame<Size2MiB>> {
118-
// let caller = core::panic::Location::caller();
119-
// log::debug!("allocation request of 2MiB by {:?}", caller);
120-
121109
self.0.get().map(|m| {
122110
m.lock_irq()
123111
.allocate_frame_inner(order_from_size(Size2MiB::SIZE))
124112
.map(|f| PhysFrame::containing_address(f))
125113
})?
126114
}
127115

128-
#[track_caller]
129116
fn deallocate_frame(&self, frame: PhysFrame<Size2MiB>) {
130-
// let caller = core::panic::Location::caller();
131-
// log::debug!("deallocation request of 2MiB by {:?}", caller);
132-
133117
self.0
134118
.get()
135119
.map(|m| {
136120
m.lock_irq()
137121
.deallocate_frame_inner(frame.start_address(), order_from_size(Size2MiB::SIZE))
138122
})
139-
.unwrap_or(());
123+
.unwrap()
140124
}
141125
}
142126

0 commit comments

Comments
 (0)