Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | memory-util: make ArrayCleanup passed to array_cleanup() const | Yu Watanabe | 2023-05-09 | 1 | -4/+4 |
| | | | | Should not change any behavior, preparation for later commits. | ||||
* | memory-util: add a concept for gcc cleanup attribute based array destruction | Lennart Poettering | 2023-02-23 | 1 | -0/+34 |
| | |||||
* | boot: Simplify object erasure | Jan Janssen | 2023-01-09 | 1 | -11/+1 |
| | | | | | | | | This erase_obj() machinery looks like voodoo and creates an awful lot of noise as soon as we get back to building with -O0. We can do this in a more simple way by introducing a struct that holds the information we need on cleanup. When building with optimization enabled, all this gets inlined and the eraser vanishes. | ||||
* | memory-util: introdyce mempcpy_safe() | Yu Watanabe | 2022-02-16 | 1 | -2/+10 |
| | |||||
* | memory-util: replace memeqzero() by a more generic memeqbyte() | Lennart Poettering | 2021-09-13 | 1 | -1/+3 |
| | | | | | The new helper can check for any byte, no just zeroes. The old name is then converted into a macro that wraps our new version of the helper. | ||||
* | memory-util: add mempmem_safe() | Lennart Poettering | 2021-08-10 | 1 | -0/+10 |
| | | | | | | | | This is like memmem_safe() but returns a pointer after the needle, instead to the beginning of the needle. This is then used at one place. Not much, but it makes me sleep safer at night, as it avoids the manual counting done so far. | ||||
* | Merge pull request #19662 from yuwata/memdup | Lennart Poettering | 2021-05-19 | 1 | -3/+3 |
|\ | | | | | util: make memdup() or friends safer | ||||
| * | memory-util: make memcpy_safe() return pointer to destination | Yu Watanabe | 2021-05-19 | 1 | -3/+3 |
| | | |||||
* | | alloc-util: introduce MALLOC_SIZEOF_SAFE() helper | Lennart Poettering | 2021-05-19 | 1 | -1/+1 |
|/ | | | | | | | | | It's a wrapper around malloc_usable_size() that is supposed to be compatible with _FORTIFY_SOURCES=1, by taking the __builtin_object_size() data into account, the same way as the _FORTIFY_SOURCES=1 logic does. Fixes: #19203 | ||||
* | license: LGPL-2.1+ -> LGPL-2.1-or-later | Yu Watanabe | 2020-11-09 | 1 | -1/+1 |
| | |||||
* | bus-message: add macro for calculation of offset from the page | Zbigniew Jędrzejewski-Szmek | 2020-06-22 | 1 | -0/+1 |
| | |||||
* | memory-util: add missing () in macro evaulation | Lennart Poettering | 2020-04-23 | 1 | -1/+1 |
| | |||||
* | tree-wide: yet another batch of coccinelle recommendations | Frantisek Sumsal | 2020-01-02 | 1 | -3/+2 |
| | | | | | Prettify certain parts of the codebase using coccinelle transformations (no functional changes). | ||||
* | memory-util: introduce erase_and_free() helper | Lennart Poettering | 2019-12-04 | 1 | -7/+14 |
| | |||||
* | memory-util: Add PAGE_ALIGN_DOWN | Chris Down | 2019-10-03 | 1 | -0/+1 |
| | | | | | For example, cgroup v2 rounds down to the previous page when returning memory limits. | ||||
* | test: add _cleanup_(erase_and_freep) | Zbigniew Jędrzejewski-Szmek | 2019-07-10 | 1 | -0/+11 |
| | | | | | Based on the macro and test case by Lennart Poettering and Topi Miettinen suggestion. | ||||
* | basic/memory-util: do not "return" anything from memzero() macro | Zbigniew Jędrzejewski-Szmek | 2019-05-30 | 1 | -2/+2 |
| | | | | The macro is not used in expressions, so we don't need the ternary statement. | ||||
* | ask-password: erase character read with _cleanup_ | Lennart Poettering | 2019-03-20 | 1 | -0/+5 |
| | | | | | This is much nicer, since it means we erase the character regardless how we exit the scope. | ||||
* | util: move some raw memory functions from string-util.h → memory-util.h | Lennart Poettering | 2019-03-14 | 1 | -0/+26 |
| | |||||
* | util: split out memcmp()/memset() related calls into memory-util.[ch] | Lennart Poettering | 2019-03-13 | 1 | -0/+53 |
Just some source rearranging. |