Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 924720 Details for
Bug 985419
p11-kit: realloc behavior
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
common: Don't do repeated linear reallocation of array memory
common-Dont-do-repeated-linear-reallocation-of-arr.patch (text/plain), 899 bytes, created by
Stef Walter
on 2014-08-07 06:40:11 UTC
(
hide
)
Description:
common: Don't do repeated linear reallocation of array memory
Filename:
MIME Type:
Creator:
Stef Walter
Created:
2014-08-07 06:40:11 UTC
Size:
899 bytes
patch
obsolete
>From 4f2cc97a95733e9ea8f85510b0f1e5c99053ae5e Mon Sep 17 00:00:00 2001 >From: Stef Walter <stef@thewalter.net> >Date: Thu, 7 Aug 2014 08:38:46 +0200 >Subject: [PATCH] common: Don't do repeated linear reallocation of array memory > >Some mallocs (notably on Windows) have really poor behavior when >called repeatedly with a linearly growing buffer. > >https://bugzilla.redhat.com/show_bug.cgi?id=985419 >--- > common/array.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/common/array.c b/common/array.c >index 9802100..9bff748 100644 >--- a/common/array.c >+++ b/common/array.c >@@ -48,7 +48,10 @@ maybe_expand_array (p11_array *array, > if (length <= array->allocated) > return true; > >- new_allocated = array->allocated + 16; >+ >+ new_allocated = array->allocated * 2; >+ if (new_allocated == 0) >+ new_allocated = 16; > if (new_allocated < length) > new_allocated = length; > >-- >2.0.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 985419
: 924720