Scratchpad and psplink memory free
Scratchpad and psplink memory free
my app is going to be stressed for memory so i'm trying to use all that i can because the main desktop uses 7000KB heap (so far) and is 1.3 MB in size (so far and rising) and another one that is 1.3 MB in size and 2000KB heap so i noticed the scratch pad on psplink so i want to know how can i use the scratch pad maybe for temp stuff like an in memory swap or something and what is the scratchpad
also what are those other partions on psplink when i do memreg and how can i find the one that my app is using because there should be two one for the main eboot and one for the desktop eboot
also what are those other partions on psplink when i do memreg and how can i find the one that my app is using because there should be two one for the main eboot and one for the desktop eboot
Set PSP_THREAD_ATTR_SCRATCH_SRAM along with PSP_THREAD_ATTR_USER for your program, then bang on it directly. If I remember correctly, you're also supposed to clear the scratch ram before you exit the program.
Also, YAPSPD says it's 16 KB, not 4.
http://hitmen.c02.at/files/yapspd/psp_d ... .html#sec7
Also, YAPSPD says it's 16 KB, not 4.
http://hitmen.c02.at/files/yapspd/psp_d ... .html#sec7
so if i do that then how do i use it and how much faster is it and also where can i find PSP_THREAD_ATTR_SCRATCH_SRAMJ.F. wrote:Set PSP_THREAD_ATTR_SCRATCH_SRAM along with PSP_THREAD_ATTR_USER for your program, then bang on it directly. If I remember correctly, you're also supposed to clear the scratch ram before you exit the program.
Also, YAPSPD says it's 16 KB, not 4.
http://hitmen.c02.at/files/yapspd/psp_d ... .html#sec7
yeah so i'm right just making sure my hex math was right cause i wasnt sure if it was exactly 16k or roughly 16k like 16.3k or some odd numberJ.F. wrote:Just look at my link above to YAPSPD. It tells you the start and end in hex.
0x00010000 to 0x00013FFF, or 0x4000 long... which is 4x4k = 16k = 16*1024
thanks
Indeed, it is useless if the goal is for performance because this scratch pad is not connected directly to CPU but is accessible only through the BUS the same way it is for main ram so at the BUS frequency. Bad design...Jim wrote:OK, so the reference I found is old... :(
On the PS1 the scratchpad was a great place to build stuff. Is that not the case on PSP?
I hope the extra 16K solves the OP's problem :D
Jim
i tried to use it by adding like this and it hangs the psp actually took a while to trace the problem because it was in a prx
so how would i use this
Code: Select all
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_SCRATCH_SRAM | THREAD_ATTR_USER | THREAD_ATTR_VFPU );