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

Re: [MiNT] USERDEF stack size



Am 22.12.2010, 21:29 Uhr, schrieb Vincent Rivière <vincent.riviere@freesbee.fr>:

Vincent Rivière wrote:
    short vdi_intin[VDI_INTINMAX];
    short vdi_intout[VDI_INTOUTMAX];

I really would like to solve that issue in GemLib. Because of that, if we currently rebuild QED from sources, the resulting executable can't run on single TOS. Also, I would like to build QED for ColdFire.

Do everybody agree to replace the above lines by malloc(), everywhere in the GemLib where VDI_INTINMAX and VDI_INTOUTMAX are used ?

What is the right thing to do if malloc() returns NULL ?
Can GEM functions return an error code ?

Also, I'm quite annoyed because the new version of v_gtext() and co using malloc() will be a bit slower than the previous ones, and it will only be useful for plain TOS. So "standard" users using only XaAES will only get the drawbacks.

That's why I disagree. I'd suggest a mixed solution:

- make VDI_INTMAX, etc. smaller e.g. 80 bytes

- check text-length (strlen)

- if > 80 use malloc, else the stack.

What about alloca? Don't know much about it.


--
Helmut Karlowski