added memoryUsage function for string trie