Skip to content
  • Steffen Prohaska's avatar
    memory_limit: use git_env_ulong() to parse GIT_ALLOC_LIMIT · 9927d962
    Steffen Prohaska authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    GIT_ALLOC_LIMIT limits xmalloc()'s size, which is of type size_t.
    Better use git_env_ulong() to parse the environment variable, so
    that the postfixes 'k', 'm', and 'g' can be used; and use size_t to
    store the limit for consistency.  The change to size_t has no direct
    practical impact, because the environment variable is only meant to
    be used for our own tests, and we use it to test small sizes.
    
    The cast of size in the call to die() is changed to uintmax_t to
    match the format string PRIuMAX.
    
    Signed-off-by: default avatarSteffen Prohaska <prohaska@zib.de>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    9927d962