get_page_size
Bran S
archsbran at gmail.com
Tue Jun 16 19:58:32 UTC 2020
On Tue, 16 Jun 2020 at 02:37, Ákos Uzonyi <uzonyi.akos at gmail.com> wrote:
>
> On Mon, 15 Jun 2020 at 22:05, Bran S <archsbran at gmail.com> wrote:
> > Thanks for the explanation, makes sense now.
> > One last query, I see that get_page_size() is being called at 25 places.
> > What is the reason to not make it a global variable and save all this?
> > A design choice?
>
> In C you cannot initialize a global variable by a function call
> expression. You would have to initialize the variable manually in all
> tests, which is tiresome and error prone.
I meant something like an extern variable or a macro maybe.
I am thinking that it is avoided because it would be bad design.
It would be nice if someone could shed some light on this.
More information about the Strace-devel
mailing list