public inbox for ecos-bugs@sourceware.org help / color / mirror / Atom feed
From: bugzilla-daemon@bugs.ecos.sourceware.org To: ecos-bugs@ecos.sourceware.org Subject: [Bug 1001634] A code review of dlmalloc.cxx revealed several weaknesses Date: Fri, 27 Jul 2012 09:12:00 -0000 [thread overview] Message-ID: <20120727091205.A3DF52F7800D@mail.ecoscentric.com> (raw) In-Reply-To: <bug-1001634-13@http.bugs.ecos.sourceware.org/> Please do not reply to this email. Use the web interface provided at: http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001634 --- Comment #1 from Bernd Edlinger <bernd.edlinger@hotmail.de> 2012-07-27 10:12:03 BST --- This is a test code to demonstrate the very slow performance of the current implementation. The parameter k is the number of kilobytes to use for the test. The execution time of memtest(n) = O(n^2) without the patch. When the patch is applied the execution time will be O(n). #include <malloc.h> void memtest(unsigned k) { unsigned i; void **p,**q; p=q=malloc(504); for (i=0; i<k; i++) { q=*q=malloc(504+4*(i%16)); } *q=0; q=p; for (i=0; i<k; i++) { void **n=*q; q=*q=*n; free(n); if (!q || !*q) q=p; } free(p); } -- Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
next prev parent reply other threads:[~2012-07-27 9:12 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-07-27 8:19 [Bug 1001634] New: " bugzilla-daemon 2012-07-27 9:12 ` bugzilla-daemon [this message] -- strict thread matches above, loose matches on Subject: below -- 2012-07-27 8:19 bugzilla-daemon 2012-07-27 9:12 ` [Bug 1001634] " bugzilla-daemon
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20120727091205.A3DF52F7800D@mail.ecoscentric.com \ --to=bugzilla-daemon@bugs.ecos.sourceware.org \ --cc=ecos-bugs@ecos.sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).