If you ever use malloc(3) in performance-critical application code you don't know memory management

>If you ever use malloc(3) in performance-critical application code you don't know memory management

Attached: d4d.jpg (1024x768, 376K)

Other urls found in this thread:

livegrep.com/search/linux?q=malloc&fold_case=false®ex=false&context=true
twitter.com/AnonBabble

Oh, I see you're versed in the subtle art of advanced memory allocation techniques. Truly a man of culture.

Attached: 1525416861310.jpg (600x750, 27K)

malloc(n) is fine though

so whats the correct way to allocate memory, user?

on the stack

>t. stackoverflow

>cs tards thinking memory management is hard.

>malloc(n)
The 3 is the section of the manual, you dolt.

is that markiplier?

that's crowder. who is markiplier?

Felix Kjellberg

Or in a pool

CS tards think memory management is easy. They don't understand CPU cache structure, memory access times, system call overhead (malloc usually calls sbrk(2) or mmap(2)), write contention, etc. They live in an idealized universe where all memory access is O(1) and their Turing machines have infinite tapes.

>CPU cache structure, memory access times, system call overhead
all of that is taught in CS, retard

>being this retarded with a big ego

Why would you allocate memory based on the section of the manual?
That's retarded.

what's a manual?

>what's a MANual
a part of patriarchal institutionalized discrimination system that needs to be dealt with

>2019
>allocating memory by hand in real world shit

how dare cis white males call it a MANual..
this is outrageous
I'm gonna write a 10 page blog-post on how oppressed I feel right now

>2019
>people now believe your OS wasnt written in C

Correct
Always allocate memory when performance isn't too critical

beforehand

t. faggot

10 seconds on google
livegrep.com/search/linux?q=malloc&fold_case=false®ex=false&context=true

man(1)

being this autistic over memory speed optimization and creating a thread on this site, with most of the people here not knowing how to even properly use malloc, let alone knowing what mmap is...
stop dicking arround here and go write some good software if you're actually good at it

It's not really autistic, it's common knowledge in hard realtime and high-end soft realtime systems (games).

You just proved him right though.

Right, because you would probably use calloc() instead.

std::new

performance-critical applications store data in cpu registers, not in memory

Many classes of performance-critical applications deal with data much too large for CPU caches, let alone registers.

What difference does it make? calloc is just as slow and non-deterministic as malloc.

Lol, many engines abstract away malloc. Many engines are actually written in JS these days. And even in unity with C# you need to jump into an unsafe context to use malloc which scares off many kiddy devs because they fear unmanaged code, lol.

haha no

Attached: srs.jpg (340x480, 44K)

Not sure if clinically retarded, lobotomized, or merely 5 years old.jpg

>Many engines are actually written in JS these days
>believing this

Attached: laff.png (376x302, 199K)

what's a computer, while we're at it?

>(games)
All of that has been taken care of already, just use someone else's engine.

I accept your surrender.