Skip to content

Conversation

kalaposfos13
Copy link
Member

Applications that do not use their own libc.prx and instead rely on libSceLibcInternal will not initialize this, and will crash on the first call of any of these functions. This PR initializes the heap API so there's at least something for these apps to work with. I tested it with NPXS20001, and it seems to work, by comparing its behaviour to when I put a libc.prx from one of my games to its sce_module folder. However, since I'm not too knowledgeable on this topic, I'll open it as a draft for now.

@kalaposfos13 kalaposfos13 force-pushed the init-heap-api branch 2 times, most recently from 9895ecc to 3842a02 Compare July 16, 2025 11:11
@kalaposfos13 kalaposfos13 changed the title Initialize the heap API Initialize the heap API and add new memory functions in HLE LibcInternal Jul 16, 2025
Comment on lines +33 to +35
void* PS4_SYSV_ABI internal_malloc(size_t size) {
return std::malloc(size);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be more ideal to properly reimplement these instead of using host functions.
Most of these boil down to kernel memory functions if I remember right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants