Hottest Free Downloads - DownloadPipe.com Over 197,000 downloads! Bookmark Now!
DownloadPipe.com - New Downloads Every Minute
 SEARCH:
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Bug#535695: std::ifstream uses a block size of 8191 bytes ..

 
   Linux (Home) -> Bugs Dist RSS
Next:  Bug#535697: gtk-qt-engine-kde4: gtk-qt-engine res..  
Author Message
Florian Weimer

External


Since: Dec 24, 2004
Posts: 299



(Msg. 1) Posted: Sat Jul 04, 2009 10:25 am
Post subject: Bug#535695: std::ifstream uses a block size of 8191 bytes (not 8192)
Archived from groups: linux>debian>bugs>dist (more info?)

Package: libstdc++6-4.3-dev
Version: 4.3.3-13

The program below reads the input file in blocks of 8191 bytes (as
shown by strace). There's probably a mistake somewhere because it
should use 8192 byte blocks. (8191 byte blocks tend to maximize
misalignment.)

Recompiling with g++-4.4 doesn't change this. Using the
in.rdbuf()->sgetc() and friends exhibits the same behavior, too.

#include <iostream>
#include <fstream>

static int usage(const char* progname);

int
main(int argc, const char** argv)
{
if (argc != 2) {
return usage(argv[0]);
}

const char* filename = argv[1];
std::ifstream in(filename);

std::string l;
while (in) {
std::getline(in, l);
}

if (in.eof()) {
return 0;
} else {
std::cerr << "error: reading from: " << filename << std::endl;
return 1;
}
}

static int
usage(const char* progname)
{
std::cerr << "usage: " << progname << " FILE\n";
return 1;
}




--
To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST.TakeThisOut@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.TakeThisOut@lists.debian.org
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Bug#335975: ku.po has bad characters as first two bytes of.. - Removing the binary first two characters of the file ku.po fixes the problem Can't create the patch. Please fix this on the CVS file. thanks. However the issue with Makefile still remains (the missing file). The Makefile.in (version 1.4) works fine. ...

Bug#328644: gringotts: fails to start: Increase the memory.. - Package: gringotts Version: 1.2.8+1.2.9pre1-8 Severity: grave Justification: renders package unusable hi, I don't know if it's just me, my kernel or the new gnome (but I doubt the latter) but gringotts in testing fails to start. once again :-/. I star...

Bug#352167: Please document the 'block' and 'unblock' comm.. - Package: bugs.debian.org Severity: wishlist Hi, BTS documentation at http://www.debian.org/Bugs/server-control does not include information about the new 'block' and 'unblock' commands. It would be great if these commands were added to the reference. ...

Bug#367108: bugs.debian.org: Can't use block with clone to.. - Package: bugs.debian.org Severity: normal I tried to block a bug by its clone, but it didn't work. Processing commands for control@bugs.debian.org: > clone 317724 -1 Bug#317724: epiphany-browser: cannot move tabs to other windows Bug 317724 cloned...

Bug#355198: manpages-dev: dlsym(3) lacking critical unders.. - Package: manpages-dev Version: 2.02-2 Severity: normal In the man page for dlsym, the line #define GNU_SOURCE should read #define _GNU_SOURCE or the code block will not compile. -- System Information: Debian Release: testing/unstable...
       Linux (Home) -> Bugs Dist All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows Forums
 Game Forums
  Linux Forums
 Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact