@aldostools
Do you know what the rationale is for the usage of sysPrxForUser functions over exported vsh equivalents libc functions?
sys_malloc, sys_printf etc..
First of all, are those really just duplicates? Or do they action extra locks, thread safety or whatever?
I could not find any info about this stuff anywhere. When I look at vsh module disassemblies, it's unclear what the rules are, a vsh module often uses both function types, they may use say memcpy from vsh exports but sys_memset from sysPrxForUser, or even use both duplicates like memcpy & sys_memcpy.
If I take game_ext_plugin.sprx, it uses the allocator exports for the C++ operators like new & delete but at the same time it also uses sys_malloc & sys_free from sysPrxForUser.
Obviously, I am missing something here, can you enlighten me?
I don't have technical information about these specific functions. They probably are duplicates.
Often the functions are duplicated (by design) in different modules to avoid dependencies.
Sometimes they are duplicated for internal organization to group them by categories in case they need future updates.
Other times the developers are lazy and just paste a block of code with duplicated functions, not necessarily looking for efficiency.
