[GRASS5] PATCH: asprintf.c
Hamish
hamish_nospam at yahoo.com
Sun Jun 19 04:58:07 EDT 2005
G_asprintf() is using G_tempfile():
/* We cheat by printing to a tempfile via vfprintf and then reading it
* back in. Not the most efficient way, probably.
*/
Is the only way to have a safe, portable snprintf() *really* to write
and read off the disk? Surely we can do better.
Aside from being grossly inefficient, this is really bad when running
GRASS on a limited write cycle flash drive, e.g. handhelds. You can
mount /tmp on a virtual ram-drive ok, but due to the security issues
surrounding putting stuff in /tmp, G_tempfile() has to write to the
mapset, which you definitely don't want to be volatile storage.
I bring this up as I do want to put GRASS on a 2gig flash-only portable
to take into the field and don't want to trash the flash cards.
thanks,
Hamish
More information about the grass-dev
mailing list