Commit 42af9f0
committed
Add list helpers without memory operations
Previously, list_pushback() and list_remove() were the only list APIs
available for data insertion into and removal from the list by malloc
a new and free target linkage node. The memory overhead becomes a
critical issue for rapid API usage.
This change adds insertion and removal helpers that operate on linkage
nodes instead of calling malloc/free, simplifying linkage node reuse
and reducing allocation overhead.1 parent b4c2d10 commit 42af9f0
1 file changed
+37
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
103 | 121 | | |
104 | 122 | | |
105 | 123 | | |
| |||
134 | 152 | | |
135 | 153 | | |
136 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
137 | 174 | | |
138 | 175 | | |
139 | 176 | | |
| |||
0 commit comments