Maxim Pugachev wrote: > Hey all, > > I'm wondering, why an allocation type in kern/exec_elf.c is equal to > M_TEMP? For instance, kern/exec_script.c and kern/kern_exec.c allocate > memory as M_EXEC, and it looks more reasonable to me. > > What's the reason for this?
I think the reason is M_TEMP is for any data that is short lived (will be freed in the same function) and other types like M_EXEC are for data that lasts longer. But this policy is not consistent, so there's lots of counterexamples.