My concern with using a tree is that it makes a concurrent getenv() very hard to implement, and threaded programs like to make use of getenv(). Reader-writer locks don't scale on multi-core systems, and applications like this one (getenv) may give you single threaded or worse behaviour.