On Mon, Dec 12, 2005 at 09:05:38PM +0100, Marc Lehmann wrote: > This is the beginning of Perl_magic_get in debians (debug)perl on the same > system: > > 0x00000000004aaf61 <Perl_magic_get+0>: push %rbp > 0x00000000004aaf62 <Perl_magic_get+1>: mov %rsp,%rbp > 0x00000000004aaf65 <Perl_magic_get+4>: push %r12 > 0x00000000004aaf67 <Perl_magic_get+6>: push %rbx > 0x00000000004aaf68 <Perl_magic_get+7>: sub $0x40150,%rsp > > This allocates 262480 bytes(!) (in words: a quarter megabyte) of local > variables on the stack.
#ifdef HAS_GETGROUPS
{
Groups_t gary[NGROUPS];
i = getgroups(NGROUPS,gary);
while (--i >= 0)
Perl_sv_catpvf(aTHX_ sv, " %"Gid_t_f, gary[i]);
}
#endif
sizeof(gid_t) (4) * NGROUPS (65536) == 256kb
Idiotic way to write that code. It should be fetching the number of
groups with getgroups(0, NULL) and then allocating dynamically. This
happens in several places.
I don't know why your copy didn't build support for large
supplementary group lists.
--
.''`. ** Debian GNU/Linux ** | Andrew Suffield
: :' : http://www.debian.org/ |
`. `' |
`- -><- |
signature.asc
Description: Digital signature

