Dan Sugalski <[EMAIL PROTECTED]> wrote: > ... Seems that gcc does *not* > align function pointers by default.
I've now created a new config key: HAS_aligned_funcptr => 1 which creates #define PARROT_HAS_ALIGNED_FUNCPTR 1 This key is already set for GCC. So, if you are using another compiler please check the docs, if functions are aligned at least at an even byte boundary and if yes, set this config var (see config/auto/gcc.pl). If this define isn't set, we have to use "plan B", which is a compare of the function pointer address against the PMC arenas low and high addresses - not too costly but still some slow-down. I really don't know how to probe for it: you could test 100 functions find them all aligned and the 101th isn't. We could create a check in the function registering routines, though. leo