r/ProgrammerHumor • • Oct 12 '26

Meme stdModernizeMyCodebase

Post image
191 Upvotes

44 comments sorted by

View all comments

Show parent comment

13

u/mad_cheese_hattwe Oct 13 '26

Isn't Malloc at boot, just a janky geto static with more steps?

4

u/Attileusz Oct 13 '26

Depending on what they mean by "malloc on boot". Maybe you are loading a file and the file has a header and you need to read the header to know how much to allocate. Maybe you are making an interpreter and max memory is a command line option and you alloc it all at once. If it is literally just malloc(SOME_CONSTANT) then yes.

1

u/mad_cheese_hattwe Oct 14 '26

If you're embedded I'd say it's still preferable to static out the workspace with checks for oversized requirement inputs then just sending it and crossing your fingers that the stack can handle it.

1

u/awesome-alpaca-ace Oct 18 '26

Unlimited ulimit. I did once out of spite for C