Closed veremenko-y closed 3 months ago
Still thinking about this. It's nice to have the value but patching ps magically is the wrong way to do it, and ps having secret knowledge is not much better.
No worries. I understand why you're not sure. I think the only proper way to keep track of it is to add it to p_tab
which brings a lot consequences with it...
Core stuff done. Just needs the target to set p->size
For pico every program is located at
PROGBASE
, so substracting it fromp_top
and rounding up to the ram block size (4k) will result in the correct value of memory allocated for process.