That's because you've defined c as a function, not as a variable. In Pure, a function will be evaluated each time you call it, even if it has no parameters. Try evaluating just `c` by itself and you'll see what I mean.
To create a global variable which stores the value returned by malloc, use this instead:
let c = malloc 123;
Or, if you only need this value temporarily inside another function, you'd use a local variable definition (`when` clause) like this:
foo n = do_something_with_c_here when c = malloc n end;
HTH,
Albert