File tree Expand file tree Collapse file tree 4 files changed +83
-0
lines changed
Expand file tree Collapse file tree 4 files changed +83
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ menu "tools packages"
22
33source "$PKGS_DIR/packages/tools/vector/Kconfig"
44source "$PKGS_DIR/packages/tools/sorch/Kconfig"
5+ source "$PKGS_DIR/packages/tools/dict/Kconfig"
56source "$PKGS_DIR/packages/tools/CmBacktrace/Kconfig"
67source "$PKGS_DIR/packages/tools/MCoreDump/Kconfig"
78source "$PKGS_DIR/packages/tools/EasyFlash/Kconfig"
Original file line number Diff line number Diff line change 1+ # Kconfig for package dict
2+ menuconfig PKG_USING_DICT
3+ bool "dict: a general-purpose dictionary module"
4+ default n
5+
6+ if PKG_USING_DICT
7+ config PKG_DICT_PATH
8+ string
9+ default "/packages/tools/dict"
10+
11+ config DICT_DEFAULT_CAPACITY
12+ int "Default initial capacity"
13+ default 32
14+ range 8 65536
15+ help
16+ Set the default bucket array capacity when creating a dictionary
17+ without specifying a configuration. Recommended values: 16/32/64.
18+ Higher values reduce resize operations but consume more memory.
19+
20+
21+ config DICT_LOAD_FACTOR_X100
22+ int "Load factor (x100)"
23+ default 75
24+ range 50 95
25+ help
26+ Set the resize threshold as a percentage of capacity.
27+ When element count >= capacity * (load_factor/100), the dictionary
28+ automatically expands to prevent excessive hash collisions.
29+
30+ Common values:
31+ - 50: Lower memory usage, more resize operations
32+ - 75: Balanced (default)
33+ - 90: Higher memory usage, fewer resize operations
34+
35+ choice
36+ prompt "Version"
37+ default PKG_USING_DICT_LATEST_VERSION
38+ help
39+ Select the package version
40+
41+ config PKG_USING_DICT_LATEST_VERSION
42+ bool "latest"
43+
44+ endchoice
45+
46+ config PKG_DICT_VER
47+ string
48+ default "latest" if PKG_USING_DICT_LATEST_VERSION
49+
50+ endif
51+
52+
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " dict" ,
3+ "description" : " dict is a general-purpose dictionary module" ,
4+ "description_zh" : " dict 是一个为 RT-Thread 设计的通用字典模块,支持任意数据类型的键值对存取" ,
5+ "enable" : " PKG_USING_DICT" ,
6+ "keywords" : [
7+ " dict" , " dictionary" , " key-value pairs"
8+ ],
9+ "category" : " tools" ,
10+ "author" : {
11+ "name" : " zhangguofu" ,
12+ "email" : " cleancode@163.com" ,
13+ "github" : " Gary.Zhang"
14+ },
15+ "license" : " MIT" ,
16+ "repository" : " https://github.com/zhangguofu/dict" ,
17+ "icon" : " unknown" ,
18+ "homepage" : " https://github.com/zhangguofu/dict#readme" ,
19+ "doc" : " unknown" ,
20+ "site" : [
21+ {
22+ "version" : " latest" ,
23+ "URL" : " https://github.com/zhangguofu/dict.git" ,
24+ "filename" : " dict.zip" ,
25+ "VER_SHA" : " main"
26+ }
27+ ]
28+ }
Original file line number Diff line number Diff line change @@ -24,3 +24,5 @@ if PKG_USING_SORCH
2424 default "latest" if PKG_USING_SORCH_LATEST_VERSION
2525
2626endif
27+
28+
You can’t perform that action at this time.
0 commit comments