Readit News logoReadit News
dellorter commented on Arena allocator tips and tricks   nullprogram.com/blog/2023... · Posted by u/jandeboevrie
matheusmoreira · 2 years ago
Excellent article.

> While you could make a big, global char[] array to back your arena, it’s technically not permitted (strict aliasing).

Aren't char pointers/arrays allowed to alias everything?

I used that technique in my programming language and its allocator. It's freestanding so I couldn't use malloc. I had to get memory from somewhere so I just statically allocated a big array of bytes. It worked perfectly but I do disable strict aliasing as a matter of course since in systems programming there's aliasing everywhere.

dellorter · 2 years ago
If you overlay a struct in your (char) buffer and dereference a pointer to it you would be accessing something with a different type than its declared type(char* as struct something *), it’s strict aliasing violation

To do stay in the rules you could set up a void* to suitable region in a linkerscript

Dead Comment

Dead Comment

Dead Comment

Dead Comment

Dead Comment

dellorter commented on I'm 17 and wrote this guide on how CPUs run programs   github.com/hackclub/putti... · Posted by u/archmaster
makeworld · 2 years ago
What do you mean "rule of thumb"? That's just an old meme making fun of how most Internet users were male. It's not about how you shouldn't mention gender.

If gender is never mentioned, maleness is assumed all the time, and then male users will not realize the abilities of their female peers.

dellorter · 2 years ago
I think something valuable is lost if everyone must present irrelevant identity information to combat false assumptions some may hold. At least for the crowd who want to primarily be associated with attributes that can be merited to their choosing.
dellorter commented on I'm 17 and wrote this guide on how CPUs run programs   github.com/hackclub/putti... · Posted by u/archmaster
oytis · 2 years ago
Internet is a different place now. People bring their personalities and identities in. Don't think there is anything wrong with it. Also nothing wrong with being more patient with very young people and more impressed with their achievements IMO.
dellorter · 2 years ago
I think some of the negativity towards identity is that it’s usually not something that can be merited as your doing and not usually relevant.

I understand this criticism, but think it’s a lost cause to point it out.

Dead Comment

dellorter commented on I'm 17 and wrote this guide on how CPUs run programs   github.com/hackclub/putti... · Posted by u/archmaster
cprecioso · 2 years ago
Doesn't the idiom "girls do not exist on the internet" itself point to the "standard" that, in this circles, men think of the people are interacting with as men, as "default", and the not-default is women. And we come back to the invisibilization of people who are not a white young guy in tech.

I'd wish to get as far away as possible from such an attitude, and thus really enjoy when I see people outside of this "norm" to make themselves known and attract more heterogenous people that can enrich the community.

dellorter · 2 years ago
I don’t think it’s intended as such, but the particular phrasing as expressed could be misinterpreted as such. Therefore it should be expressed differently; don’t choose to differentiate based on attributes that shouldn’t make a difference for your message.

u/dellorter

KarmaCake day1August 9, 2023View Original