4 ms·
Its a nifty tool, but I can't help feeling a little disappointed that we're still having to deal directly with issues such as memory allocation in 2019.
by lbj 8y ago
Its a nifty tool, but I can't help feeling a little disappointed that we're still having to deal directly with issues such as memory allocation in 2019.
- chrisseaton 8y agoHow do you think we should be dealing with memory allocation instead?
- blattimwind 8y agoaddr = getrandom(8); mem = mmap(addr, len, PROT_RWX, MAP_FIXED|MAP_ANON, -1, 0);
- chrisseaton 8y agoIt's not realistic to use a per-allocation mapping like that in production - all your allocations will be scaled up to multiples of pages.
- jacquesm 8y agoWhoosh!
- saagarjha 8y ago> PROT_RWX Hmm…
- blattimwind 8y agoThe X is for fleXibility.
- rzzzt 8y agoHow else will you put the self-modifying code there?
- benj111 8y agoYou don't necessarily. Don't forget that theres memory managed languages that compile to c. They still use malloc under the hood.
- lbj 8y agoThats a good point.
- asveikau 8y agoSomebody's got to deal with it so that you may have the luxury of not dealing with it.
- aaaaaaaaaab 8y agoRight? Just use JavaScript already! /s
- EpicEng 8y agoWell 'we' deal with it so that you don't have to. What do you suggest? Somewhere memory needs to be allocated, this stuff isn't magic.
- deleted 8y ago[deleted]