Boehm Garbage Collector any success stories of porting?
Boehm Garbage Collector any success stories of porting?
anyone ever tried to port/build boehm-gc for the PSP (with success :P)?
Can't find anything on it. But 'D' language has a garbage collector I believe.
In any case good programmers shouldn't leave garbage and it makes me sick to see such code.
I harbor similar hatred towards malloc() and the heap on the PSP. sceKernelAllocPartitionMemory FTW. Hell, malloc() should have just been a wrapper around sceKernelAllocPartitionMemory, just to make porting old stuff easier.
Let the bashing begin.
In any case good programmers shouldn't leave garbage and it makes me sick to see such code.
I harbor similar hatred towards malloc() and the heap on the PSP. sceKernelAllocPartitionMemory FTW. Hell, malloc() should have just been a wrapper around sceKernelAllocPartitionMemory, just to make porting old stuff easier.
Let the bashing begin.
Unfortunately if I recall sceAllocPartitionMemory allocates fixed sized chunks of memory, so if you has alot of small allocations it would quickly nuke all of memory, which is why you need some sort of heap management. Malloc is standardised, if you don't like it you don't have to use it, or any of the rest of libc, it is entirely up to you :)
To be particular about my problem, I'm using DAX's VLF lib in my app which allows you to load custom themes. I'm forced to defined a fixed heap size which may be too small or too big for the user's custom theme.TyRaNiD wrote:Unfortunately if I recall sceAllocPartitionMemory allocates fixed sized chunks of memory, so if you has alot of small allocations it would quickly nuke all of memory, which is why you need some sort of heap management. Malloc is standardised, if you don't like it you don't have to use it, or any of the rest of libc, it is entirely up to you :)
I can allocate using the sce functions for reading the file, but VLF needs the heap to load the images. >:|
My original post was because I was trying to get libgcj to compile for the psp. I managed to get the whole compiler (gcj) to build and it compiles java code to psp mips, however it doesn't link because i didn't manage to get libgcj to compile. Libgcj has a dependency on bohem gc that's why i was trying to get some help.
Which appears to be the case because VLF uses its own libc and your app can also only use vlflibc.TyRaNiD wrote:it is only an issue if the library uses its own internal malloc which you can't override.
It wouldn't be a problem if it was a standalone game mode eboot, but my app is a vshmain.prx replacement so the Sony VSH modules also allocate memory. And I can't define an arbitrary value for heap because the Phat and Slim have different amounts of free memory in the VSH.
It would be nice native java on psp, I hope you can achieve it :)Heimdall wrote:My original post was because I was trying to get libgcj to compile for the psp. I managed to get the whole compiler (gcj) to build and it compiles java code to psp mips, however it doesn't link because i didn't manage to get libgcj to compile. Libgcj has a dependency on bohem gc that's why i was trying to get some help.