Subject: Re: [PATCH] abspath.c: use PATH_MAX in real_path_internal()

From: Junio C Hamano <[email-masked]>
Date: Fri, 18 Jul 2014 09:45:57 -0700

Karsten Blees <[email-masked]> writes:

> Am 17.07.2014 14:45, schrieb Nguyễn Thái Ngọc Duy:
>> e.g. "git init". Make it static too to reduce stack usage.
>
> But wouldn't this increase overall memory usage? Stack memory
> will be reused by subsequent code, while static memory cannot
> be reused (but still increases the process working set).

Correct.  And this is a function that is not involved in deep
recursion, so avoiding stack allocation seems quite misguided.