Displaying 2 results from an estimated 2 matches for "5e085763".
2019 Aug 15
2
[nbdkit PATCH] data, memory: Optimize .zero > PAGE_SIZE
...is_zero() - we already
know the page will be free()d.
Signed-off-by: Eric Blake <eblake@redhat.com>
---
Here's a fun one :)
common/sparse/sparse.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/common/sparse/sparse.c b/common/sparse/sparse.c
index cb44743c..5e085763 100644
--- a/common/sparse/sparse.c
+++ b/common/sparse/sparse.c
@@ -343,10 +343,13 @@ sparse_array_zero (struct sparse_array *sa, uint32_t count, uint64_t offset)
n = count;
if (p) {
- memset (p, 0, n);
+ if (n < PAGE_SIZE)
+ memset (p, 0, n);
+ else
+...
2019 Aug 15
0
Re: [nbdkit PATCH] data, memory: Optimize .zero > PAGE_SIZE
...gt;
> Signed-off-by: Eric Blake <eblake@redhat.com>
> ---
>
> Here's a fun one :)
>
> common/sparse/sparse.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/common/sparse/sparse.c b/common/sparse/sparse.c
> index cb44743c..5e085763 100644
> --- a/common/sparse/sparse.c
> +++ b/common/sparse/sparse.c
> @@ -343,10 +343,13 @@ sparse_array_zero (struct sparse_array *sa, uint32_t count, uint64_t offset)
> n = count;
>
> if (p) {
> - memset (p, 0, n);
> + if (n < PAGE_SIZE)
> +...