?????????????????? Linux ????????????????????????????????????????????????????????????????? Radix tree??Linux ???????????????? radix tree ?????? API ????
????include/linux/radix-tree.h
????lib/radix-tree.c
?????????????????? radix tree ??Radix tree ????? ??? trie?? trie ??????????????????饗associative array?????? ?????-???key-value?? ?洢?????????????????????????????????????????????????????? Trie ????????? n-tree ??????????в????洢????????????????洢?????????????????????????????????????????????????????????????????????????????????????????

????????????У??????????? trie ???洢????????? go ?? cat????? trie ?? radix tree ?? trie ??????????????????????????м??????????
????Linux ????е? Radix ??????????????????Radix ????????????? include/linux/radix-tree.h ????? :
????struct radix_tree_root {
????unsigned int            height;
????gfp_t                   gfp_mask;
????struct radix_tree_node  __rcu *rnode;
????};
????????????? radix ???? root ??????壬???????????????
????height????????????????????????
????gfp_mask??????????????
????rnode?????????
????????????????????????? gfp_mask :
????Linux ?????????????????????????flag?? – gfp_mask ???????????????????????????? GFP_ ????????????????????????????GFP_NOIO ??????? IO ?????????????????棬__GFP_HIGHMEM ????????????????棬GFP_ATOMIC ??????????????????????????????
????????????????????? rnode??
????struct radix_tree_node {
????unsigned int    path;
????unsigned int    count;
????union {
????struct {
????struct radix_tree_node *parent;
????void *private_data;
????};
????struct rcu_head rcu_head;
????};
????/* For tree user */
????struct list_head private_list;
????void __rcu      *slots[RADIX_TREE_MAP_SIZE];
????unsigned long   tags[RADIX_TREE_MAX_TAGS][RADIX_TREE_TAG_LONGS];
????};
????????????а????????????????????????????????????????????????????洢?????????????????£?
????path????????????????????????
????count????????????
????parent???????????
????private_data???洢???????????????
????rcu_head???????????? RCU ?????
????private_list – ?洢?????
???????? radix_tree_node ?????????? tags ?? slots ??????????????????????? Radix ??????????????????洢???????? slots ????????? slots ???????? NULL?? Linux ???? Radix ???????л??????????????洢?????? tags ???????????λ?????? Radix ????????洢????
???????????????? radix ?????????????????? radix ???????? API??