This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug stdio/21127] New: printf functions can take much memory with %g when the format precision is large
- From: "vincent-srcware at vinc17 dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 10 Feb 2017 16:24:22 +0000
- Subject: [Bug stdio/21127] New: printf functions can take much memory with %g when the format precision is large
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=21127
Bug ID: 21127
Summary: printf functions can take much memory with %g when the
format precision is large
Product: glibc
Version: 2.24
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: stdio
Assignee: unassigned at sourceware dot org
Reporter: vincent-srcware at vinc17 dot net
Target Milestone: ---
On some easy cases, the printf functions take much memory when the precision in
the format string is large. For instance:
#include <stdio.h>
int main (void)
{
for (int i = 20; i > 0; i--)
printf ("%.300000000g\n", i + 0.5);
return 0;
}
The printf function is fast on 20.5 to 10.5, but starting with 9.5, it becomes
very slow and takes much memory (about 1 GB on my Debian Linux x86_64 machine
with libc6 2.24), while these cases are very similar.
--
You are receiving this mail because:
You are on the CC list for the bug.