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

Re: [MiNT] Proposal for SLB extension



> KMK>Namely, the library functions are defined so that they get the
> KMK>basepage address of the calling program as the first argument.
> KMK>Despite the fact, that under MiNT this imposes a lot of overhead to
> KMK>actually create this parameter each time the library is called,
> Why does it has to be created each time the library is called?
> Couldn't the address be saved in a variable by the startup code and always be
> used from there? (AFAIK base page addresses do not change during program
> execution). OK, this might be a little bit problematic with threads...

And also waste of memory (1000 processes may have 1000 basepages, which
implies 1000 pointers 4 byte each, i.e. 4000 bytes static table, mostly
empty, becaause there are rarely 1000 processes running :)))

My main point is, that the basepage pointer is *useless*, so there is *no*
need to waste resources (either CPU time or memory) on supplying that for
*each* library function. The proposal I made makes this optional: i.e. if
someone wants the old behaviour, it can be easily done. Also there is
perfect backward compatibility. But if someone does NOT want to impose any
overhead, he can configure the SLB so that there will be NO overhead at
all.

Get the idea now? It is not a question of "how to supply the basepage
pointer with minimum  waste", but "how to avoid the waste". :)

--
Konrad M.Kokoszkiewicz
mail: draco@atari.org
http://www.obta.uw.edu.pl/~draco/
http://draco.atari.org

** Ea natura multitudinis est,
** aut servit humiliter, aut superbe dominatur (Liv. XXIV,25)
*************************************************************
** Taka to juz natura pospolstwa, ze albo sluzy ono unizenie,
** albo bezczelnie sie panoszy.