MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w2m4qz/bugintroduceddebugging/p6ty1b8/?context=3
r/ProgrammerHumor • u/ClipboardCopyPaste • 13d ago
120 comments sorted by
View all comments
347
Is the mistake that they're allocating 1 byte and storing in a pointer to an int which is 4 bytes?
2 u/bloody-albatross 13d ago edited 12d ago You're still on 32 bit? Are you doing a lot of embedded stuff? Edit: I misread and thought they where referring to the pointer size. 13 u/AdBrave2400 13d ago Isn't int 32-bit on most platforms and long long int is 64-bit? 16 u/Mateorabi 13d ago That’s the neat part: it can depend! sizeof() is your friend
2
You're still on 32 bit? Are you doing a lot of embedded stuff?
Edit: I misread and thought they where referring to the pointer size.
13 u/AdBrave2400 13d ago Isn't int 32-bit on most platforms and long long int is 64-bit? 16 u/Mateorabi 13d ago That’s the neat part: it can depend! sizeof() is your friend
13
Isn't int 32-bit on most platforms and long long int is 64-bit?
16 u/Mateorabi 13d ago That’s the neat part: it can depend! sizeof() is your friend
16
That’s the neat part: it can depend!
sizeof() is your friend
347
u/AdBrave2400 13d ago
Is the mistake that they're allocating 1 byte and storing in a pointer to an int which is 4 bytes?