| ff339365 | 11-Jun-2021 |
Mariusz Zaborski <[email protected]> |
libnv: optimize nvlist size calculation
If we had a multiple nvlist, during nvlist_pack, we calculated the size of every nvlist separately. For example, if we had a nvlist with three nodes each cont
libnv: optimize nvlist size calculation
If we had a multiple nvlist, during nvlist_pack, we calculated the size of every nvlist separately. For example, if we had a nvlist with three nodes each containing another (A contains B, and B contains C), we first calculated the size of nvlist A (which contains B, C), then we calculate the size of B (which contains C, notice that we already did the calculation of B, when we calculate A), and finally C. This means that this calculation was O(N!). This was done because each time we pack nvlist, we have to put its size in the header (the separate header for A, B, and C).
To not break the ABI and to reduce the complexity of nvlist_size, instead of calculating the nvlist size when requested, we track the size of each nvlist.
Reported by: pjd, kp Tested by: kp
(cherry picked from commit 89d5cbb82294c8624e66f920d50353057ccab14b)
show more ...
|
| 4c79391a | 17-Feb-2019 |
Mariusz Zaborski <[email protected]> |
libnv: fix double free
In r343986 we introduced a double free. The structure was already freed fixed in the r302966. This problem was introduced because the GitHub version was out of sync with the F
libnv: fix double free
In r343986 we introduced a double free. The structure was already freed fixed in the r302966. This problem was introduced because the GitHub version was out of sync with the FreeBSD one.
Submitted by: Mindaugas Rasiukevicius <[email protected]> MFC with: r343986
(cherry picked from commit d97753b5c8f1d32fbcdcbb0d129b49f808245865)
show more ...
|
| a1742a58 | 11-Apr-2019 |
Mariusz Zaborski <[email protected]> |
libnv: fix compilation warnings
When building libnv without a debug those arguments are no longer used because assertions will be changed to NOP.
Submitted by: Mindaugas Rasiukevicius <rmind@netbsd
libnv: fix compilation warnings
When building libnv without a debug those arguments are no longer used because assertions will be changed to NOP.
Submitted by: Mindaugas Rasiukevicius <[email protected]> MFC after: 2 weeks
show more ...
|
| 24881c06 | 18-Jun-2018 |
Mariusz Zaborski <[email protected]> |
libnv: Add nvlist_append_*_array() family of functions.
The nvlist_append_{bool,number,string,nvlist,descriptor}_array() functions allows to dynamically extend array stored in the nvlist.
Submitted
libnv: Add nvlist_append_*_array() family of functions.
The nvlist_append_{bool,number,string,nvlist,descriptor}_array() functions allows to dynamically extend array stored in the nvlist.
Submitted by: Mindaugas Rasiukevicius <[email protected]>
show more ...
|
| c11c5fb8 | 18-Jun-2018 |
Mariusz Zaborski <[email protected]> |
libnv: clean parent in nvlist_array when removing it.
When we are removing element form the nvlist we should also clean parent, because the array is not a part of the nvlist anymore.
Submitted by:
libnv: clean parent in nvlist_array when removing it.
When we are removing element form the nvlist we should also clean parent, because the array is not a part of the nvlist anymore.
Submitted by: Mindaugas Rasiukevicius <[email protected]>
show more ...
|
| d82e41b6 | 18-Jun-2018 |
Mariusz Zaborski <[email protected]> |
libnv: Remove nvlist argument from cnvlist_{take,free}_* functions.
All information which are need for those operations is already stored in the cookie.
We decided not to bump libnv version because
libnv: Remove nvlist argument from cnvlist_{take,free}_* functions.
All information which are need for those operations is already stored in the cookie.
We decided not to bump libnv version because this API is not used yet in the base system.
Reviewed by: pjd
show more ...
|