[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] USERDEF stack size
=?ISO-8859-1?Q?Vincent_Rivi=E8re?= wrote:
> Now let's go into the GemLib. The v_gtext() implementation is like this:
>
> void
> v_gtext (short handle, short x, short y, const char *str)
> {
> short vdi_control[VDI_CNTRLMAX];
> short vdi_intin[VDI_INTINMAX];
> short vdi_ptsin[2];
> register short n =3D vdi_str2array (str, vdi_intin);
> ....
>
> VDI_INTINMAX is actually 1024, so we have here more than 2 KB on the
> stack, which is already too much for the small AES stack.
I think it's the stack of the app (at least in XaAES) that is used not the AES-stack.
> If I put this array to static (actually global), and also in
> vqt_extent() which has the same problem, the stack usage becomes small
> enough and there is no more crash. However, there are potential
This would prove me wrong ;)
> reentrency problems.
>
> This problem does not occur with XaAES. First, it supports extended
> resources, then it has probably a cleaner usage of USERDEFs.
It saves and restores the CPU-regs. There were severe problems with
USERDEFs before.
> So the problem only occurs with plain TOS/EmuTOS and QED recompiled with
> a recent GemLib.
So VDI_INTINMAX became larger?
-Helmut