Logo
Life is short, use Python.
  • Home
  • Hot
  • Random
  • Search

Browse

  • AI AI
  • AWS AWS
  • Agile Agile
  • Algorithms Algorithms
  • Android Android
  • Apple Apple
  • Backend Backend
  • Bash Bash
  • C++ C++
  • Cloud Cloud
  • Csharp Csharp
  • All Categories

HTTP 418: I'm a teapot

The server identifies as a teapot now and is on a tea break, brb

HTTP 418: I'm a teapot

The server identifies as a teapot now and is on a tea break, brb

Realloc Memes

Posts tagged with Realloc

Possibly The Worst Way To Read A File In C

Programming C++ Algorithms Debugging
1 day ago 50.7K views 0 shares
Possibly The Worst Way To Read A File In C
This code is the programming equivalent of filling a bathtub one teaspoon at a time while expanding the bathtub after each spoon. ๐Ÿ˜ฑ Instead of reading the file in chunks or pre-allocating memory, this monster allocates exactly ONE byte, reads ONE character, reallocates the ENTIRE array, and repeats for EVERY SINGLE CHARACTER. The malloc/realloc combo is basically begging the memory manager to have a nervous breakdown. The performance would be so catastrophically bad that you could probably go make a sandwich between reading "Hello" and "World". It's like watching someone solve a maze by rebuilding the entire universe after each step.

Spotlight

ScienceHumor.io

Introducing ScienceHumor.io - where Newton's laws meet comedy! A collection of scientifically proven funny memes that react faster than sodium in water. Visit โ†’

Ad Storage Without Bankruptcy

Expand your Mac storage without selling a kidney
SAMSUNG T7 Portable SSD | ProgrammerHumor.io
Buy this and support our mission to make CORS errors a thing of the past. ๐ŸŒ‰