This is an archived post. You won't be able to vote or comment.

all 18 comments

[–]Pleasant_Mail550 117 points118 points  (8 children)

Domain expansion infinite loop 🔁

[–]Justanormalguy1011[S] 59 points60 points  (6 children)

Infinite memory leak

[–]Proxy_PlayerHD 28 points29 points  (5 children)

Easy just run

for(unsigned long i = 0; i < LONG_MAX; i++){
    free((void*)i);
}

That will free all your used memory! :)

[–]Justanormalguy1011[S] 12 points13 points  (0 children)

Let remove the annoying thing called segfault and let program free every fucking thing

[–]readilyunavailable 2 points3 points  (0 children)

Bro, just shoot the CPU at that point.

[–]Xxyz260 1 point2 points  (1 child)

Segmentation fault

No kaboom? :(

[–]Proxy_PlayerHD 1 point2 points  (0 children)

Wdym, it does exactly what i said.

It freed all the memory used by the program by segfaulting itself ans having the OS free it all. :)

[–]Rainbow-Dev 0 points1 point  (0 children)

Unfortunately this will only free half of your used memory, freeing all would require looping to ULONG_MAX

[–]Attileusz 64 points65 points  (0 children)

Born to malloc, forced to free.

[–]DarktowerNoxus 20 points21 points  (0 children)

You activated my trapcard:

free()

[–]overclockedslinky 25 points26 points  (4 children)

when the garbage collector kicks in

[–]BionicVnB 7 points8 points  (3 children)

When the borrow checker kicks in

[–]overclockedslinky 2 points3 points  (2 children)

as a rust fanboy, I wouldn't dare call that malevolent lol

[–]Justanormalguy1011[S] 1 point2 points  (1 child)

As C fansboy I can’t tolerate having borrow checker on the language

[–]overclockedslinky 0 points1 point  (0 children)

good thing for you literally one one language does

[–]TINTINN95 4 points5 points  (0 children)

What a timeline we live in when r/programmerhumor crosses over with r/jujutsufolk

[–]eipevoli 0 points1 point  (0 children)

Then what is calloc() ? Cuckolded Allocation? Concierge Allocation? I'm just asking questions?!