summaryrefslogtreecommitdiff
path: root/tools/install.sh
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2013-08-31 15:50:23 -0400
committerRich Felker <dalias@aerifal.cx>2013-08-31 15:50:23 -0400
commitdfddd43256f7ad4bad991eeff5cc51772595f327 (patch)
tree27e7540262ee86f9cdaaf283efb75230a75e3e89 /tools/install.sh
parent27b4923ba00f0a7511c7ebf5f19313d6313052e9 (diff)
downloadmusl-dfddd43256f7ad4bad991eeff5cc51772595f327.tar.gz
musl-dfddd43256f7ad4bad991eeff5cc51772595f327.tar.bz2
musl-dfddd43256f7ad4bad991eeff5cc51772595f327.tar.xz
musl-dfddd43256f7ad4bad991eeff5cc51772595f327.zip
debloat realpath's allocation strategy
rather than allocating a PATH_MAX-sized buffer when the caller does not provide an output buffer, work first with a PATH_MAX-sized temp buffer with automatic storage, and either copy it to the caller's buffer or strdup it on success. this not only avoids massive memory waste, but also avoids pulling in free (and thus the full malloc implementation) unnecessarily in static programs.
Diffstat (limited to 'tools/install.sh')
0 files changed, 0 insertions, 0 deletions