Everything2
Near Matches
Ignore Exact
Full Text
Everything2

fd leak

created by markadm

(idea) by ariels (23.9 hr) (print)   ?   (I like it!) Thu Jul 19 2001 at 15:38:01

A good way to leak your file descriptors is to mix up destructors (as in C++) with finalizers (in systems with garbage collection). The common C++ idiom is resource acquisition is initialisation (aka RAII):

{
  ifstream in(filename);
  // ... do stuff with in ...
}               // file is closed here by in's destructor
In a system with (only) garbage collection, in might not be destroyed until the system runs out of memory.

So if your system runs out of file descriptors before it runs out of memory, you're leaking fd's.


(idea) by Jargon (1.8 y) (print)   ?   (I like it!) Fri Jan 20 2006 at 18:24:28

faulty = F = fear and loathing

fd leak /F-D leek/ n.

A kind of programming bug analogous to a core leak, in which a program fails to close file descriptors (`fd's) after file operations are completed, and thus eventually runs out of them. See leak.

--The Jargon File version 4.3.1, ed. ESR, this entry manually entered by rootbeer277.


printable version
chaos

fear and loathing System administration maintenance complaints core leak Faulty
fd memory leak Feminine hygiene products never cease to amaze RAII
garbage collection stack overflow Leak fight-o-net
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
Look at this mess the Death Borg made!
Old Chestnut
Glossary of Genetics terms
The Amityville Horror
root log: February 2001
Collateral
Polish pronunciation
chocolate sorbet
Miss American Pie: A Century of Pizza in America
B-tree
The Ten Commandments Judge
Einstein-Podolsky-Rosen paradox
Inferiority complex
Paul Simon
New Writeups
Glowing Fish
Tualatin River(place)
The Jacket
Words of Advice(idea)
keepinitreal
Why buy the cow when you can get the milk for free?(idea)
John_Fox
Good Intentions Gone Wrong(person)
Cuckowski
Slavonic Princess(poetry)
Heitah
Posthumous Oscar(thing)
ignis_glaciesque
University of South Florida(place)
ignis_glaciesque
Flogstaskriket(idea)
liveforever
Caesar's last breath(idea)
dagnyswaggart
she wants to believe(personal)
antigravpussy
he doesn't know, but her eyes widen too far(thing)
dagnyswaggart
Wild tides guard her secrets(poetry)
Lord Brawl
Caesar's last breath(poetry)
locke baron
Forgotten things in space(fiction)
sitaraika
Colours(idea)
This affordable entertainment brought to you by The Everything Development Company