Dynamic loading of prx functions

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
coolkehon
Posts: 355
Joined: Mon Oct 20, 2008 5:44 am

Dynamic loading of prx functions

Post by coolkehon »

does a prx take up more space than the main prx for example a prx that holds functions for the main not all but some functions is it better to keep the functions in the main or add to the prx speaking space wise which takes up more space a funtion in a prx or one in a main eboot
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

When the PRX is loaded it only takes up as much space as the filesize of the PRX. Even in an EBOOT only the filesize of data.psp (the PRX/ELF) inside it is used in memory.

If the PRX dynamically allocates memory using malloc or sce alloc functions then that only happens when that code is executed. And you can free the allocated space anyway.
coolkehon
Posts: 355
Joined: Mon Oct 20, 2008 5:44 am

Post by coolkehon »

cool thanks good to know
one more question?
how much memory does the psp have in kernel and in user i heard something about 32 mb
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

8MiB in kernel, out of which you should have maybe a couple free at most. 24MiB for user all of which is free for your application. With M33 on the Slim and the large memory option in the makefile you should have 52MiB user on the Slim.
Post Reply