EtchedPixels / FUZIX

FuzixOS: Because Small Is Beautiful
Other
2.13k stars 267 forks source link

Patched `ps` that reports used memory for Pi Pico #1057

Closed veremenko-y closed 3 months ago

veremenko-y commented 3 months ago

For pico every program is located at PROGBASE, so substracting it from p_top and rounding up to the ram block size (4k) will result in the correct value of memory allocated for process.

EtchedPixels commented 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.

veremenko-y commented 3 months ago

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...

EtchedPixels commented 3 months ago

Core stuff done. Just needs the target to set p->size