03-30-2010
You're also doing a linear search, which can be costly if you have a huge number of open streams, a hash table may be much faster. If you have a small number it may be overkill.
It may also be that most of your work is already I/O bound, hence little gain is to be had from optimizing the code. Given the ludicrous speed of modern computers relative to modern disks I suspect this is the case.
10 More Discussions You Might Find Interesting
1. Programming
hi , I came acroos two functions fdopen() and freopen().
what is the difference between these two functions and where can they be used. Is it that fdopen() is used to write freopen().
Advance Thanks for your co-operation.
:) (1 Reply)
Discussion started by: kinnaree
1 Replies
2. Programming
hello..
i make some code with C in freebsd 5.4 and compile it in solaris
somehow i succeed compile the program.
but when i run it, i got error message "Broken Pipe"
i looked out the syntax that that caused this,
fp = fopen("file.tmp","r");
does anyone know why, and how to solve this... (3 Replies)
Discussion started by: kuampang
3 Replies
3. Web Development
Dear all,
I'm a newbie for PHP and TCPDF ,I have to change the URL to PDF, so I used FPDF , But it cannot convert most of the advanced HTML tags. So explored again and found TCPDF , it can do most of the tag but I cannot found to change URL to PDF. So Does anyone can point the example... (0 Replies)
Discussion started by: athae
0 Replies
4. UNIX for Advanced & Expert Users
Hi everyone,
I am currently trying to work out the size overhead in the library archive.
The total size of all my objects file is about 100KB. However, when I package them into the archive (libXX.a), the size gets boosted up to 200KB. I want to know what exact is that 100KB overhead. I tried... (1 Reply)
Discussion started by: jasoncrab
1 Replies
5. UNIX for Advanced & Expert Users
Hello!
I'm having problems with fopen() call in Linux.
I have shared library (created by myself) that implements some file operations:
int lib_func(char* file_name) {
...
fd = fopen(file_name, "r");
if(!fd) {... exit with error ...}
...
do something useful using fd
...
... (2 Replies)
Discussion started by: kalbi
2 Replies
6. Programming
what is the difference between
fopen and open
fread and read
fwrite and write
open and create
why this much of functions for the i/o when everything does the same...?
What is their major difference?
In which case, which is the best to use.
:confused:'ed Collins (2 Replies)
Discussion started by: collins
2 Replies
7. Programming
This code works fine when I use a command line argument for fopen()'s parameter, but when I change it to a filename, the program freezes upon compilation. input.txt is definitely there, so I can't figure it out. Thanks.
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
int... (3 Replies)
Discussion started by: lazypeterson
3 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I found a very strange thing when I linked my executable with a shared library. That is the executable only references a small function of the shared library, and the size of this function is only hundred bytes, but when I check the /proc/pid/smaps, I found that the 'Rss' of this shared... (8 Replies)
Discussion started by: Dongping84
8 Replies
9. Web Development
Hey Guys and girls,can anybody with a experience in java since i am pretty new in it, tell me why a java or java enabled web program is eating up so much system resources like CPU,Ram......ect and how to go by finding what is causing the overhead.;) Thanks a mill (3 Replies)
Discussion started by: techcreeb
3 Replies
10. Programming
Hello,
I have a problem here, I want to write a function called"myfopen()" instead of "fopen()"
for writing this function I must not use the <stdio.h> library,
Can you help me?
thanks a lot (2 Replies)
Discussion started by: hamed.samie
2 Replies
LEARN ABOUT DEBIAN
gltron
GLTRON(6) Games Manual GLTRON(6)
NAME
gltron - a tron-like 3D lightcycle game
SYNOPSIS
gltron [[-FftwbghcCsk1234simo]
DESCRIPTION
glTron is a tron-like lightcycle game with a nice 3D perspective 3D acceleration is recommended.
More information can be found at the gltron web site http://www.gltron.org/
PROBLEMS
If the game refuses to start up, check your hardware settings and that the necessary libraries are installed.
If the options are messed up, remove ~/.gltronrc and try again.
Anything else check TODO, known bugs on the website, and lastly ask in #gltron on irc.freenode.net.
OPTIONS
Valid command line options:
-O enable software optimizations, useful if your card doesn't have OpenGL acceleration. For best results combine with -t and -1.
-f fast finish after human has crashed
-F don't display FPS counter
-t don't display floor texture, use lines instead (huge speed gain)
-w don't display walls (speed gain)
-x don't show crash texture (speed gain)
-g don't show glows (small speed gain)
-c don't show ai status
-C show ai status (default: on)
-1 set resolution to 320x240
-2 set resolution to 640x480 (default)
-3 set resolution to 800x600
-4 set resolution to 1024x768
-s don't play sound
-h help
AUTHOR
Updated with PROBLEMS section by Countersync <countersync@hotmail.com> before submission to upstream source.
This manual page was written by Jeronimo Pellegrini <pellegrini@mpcnet.com.br>, based on the information in the package by Raphael
Bossek, for the Debian GNU/Linux system (but may be used by others).
2001-06-10 GLTRON(6)