From: Junio C Hamano Date: Fri, 18 Jul 2014 16:45:57 GMT Subject: Re: [PATCH] abspath.c: use PATH_MAX in real_path_internal() Message-ID: In-Reply-To: <53C85625.6020808@gmail.com> Karsten Blees 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.