2010/4/14 Blue Swirl blauwirbel@gmail.com:
On 4/14/10, Artyom Tarasenko atar4qemu@googlemail.com wrote:
2010/4/13 Blue Swirl blauwirbel@gmail.com:
On 4/13/10, Mark Cave-Ayland mark.cave-ayland@siriusit.co.uk wrote:
>> Igor Kovalenko wrote: >> >> >> > Your changes increase .bss of elf image, and that is handled by >> > entry.S automatically so no changes are needed. >> > >> >> Okay, great :) >> >> >> > BTW do we need 512K for forth heap? It may be enough to modify openbios.c >> > setting MEMORY_SIZE to 256K and DICTIONARY_SIZE to 512k there. >> > Change to ofmem_sparc64.c does not seem to be helpful. >> > >> >> I honestly don't know enough to make an informed choice, although my >> feeling is that since PPC has 512K (and it will obviously be enough to solve >> the problem with OpenSolaris) then it can't be too bad an option. Does >> anyone else have a feeling one way or the other? > > One possible problem may be that we overrun the 32 bit address space, > because there is only 3M available: 0xffd00000 to 0xffffffff.
Oh. I guess that's the amount stored in totmap[0].num_bytes in sparc32/lib.c? Then obp_dumb_memalloc really has too few space for loading Solaris kernel. Maybe because the memory is not freed.
That's only on Sparc32, but memory could be tight there too, the layout is the same.
There should be quite a few tricks to reduce memory consumption: compile with -Os, remove or make unused code conditional, optimize mixed C/Forth constructs like fword("xx") etc.
Right. This also explains why the code compiled with -o0 or debugging enabled doesn't go as far as the optimized code when using Solaris 2.5.1. Basically the memory corruption bug I reported was at least partly produced by the debugging method itself.