[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Default Stack Size



Vincent Rivière wrote:
Mark Duckworth wrote:
For the time being we are stuck with a one size stack. I was wondering if anyone has contemplated the idea of setting a default stack size other than 0 bytes?

I think a clean way to fix this problem would be to include a parameter in MINT.CNF called DefaultStackSize. So when the kernel loads an executable with extended MiNT header and the stacksize is set to 0, it will dynamically patch it with the default size.

I think it would be easy to get such behavior by making a little patch to Pexec(). Such patch would not break any compatibility.

Kernel experts, what do you thing about that ?

Well this would cause differences in behavior from users which wouldn't be immediately obvious if they are set at 0 in the mint.cnf. Would make supporting problems more difficult. That's why I suggested the binutils make a sane default but really I don't know what a sane default is. I never really thought a program would need more than 64KB of stack space but G++ easily proves me wrong ;) I guess I think small ;)

Thanks,
Mark