On Tue, 3 Jan 2012, ¹ùÑ©ËÉ wrote:
> resolved, It's lambda
Correct; to be exact it's lambda's which use local variables from the
function in which they were defined.
eg:
// Uses trampolines, since it needs x from the surrounding scope.
array foo(array a, mixed x)
{
return map(a, lambda(mixed val) {
return val || x;
});
}
// Does not use trampolines.
array bar(array a, mixed x)
{
return map(a, lambda(mixed val, mixed x) {
return val || x;
}, x);
}
> Guo Xuesong
>
>
>
>
> From:
[hidden email]
> To:
[hidden email]
> Subject: what is pike_trampoline_program?
> Date: Tue, 3 Jan 2012 02:41:46 +0800
>
>
>
>
> Hi
>
> I'm using Debug.count_objects to find memory leak. I found "program.c:9976":450622 .
>
> "program.c:9976" is something named "pike_trampoline_program". What's it?
>
> thanks.
>
> Guo Xuesong
>
--
Henrik Grubbström
[hidden email]
Roxen Internet Software AB