kirby,
@kirby@lab.nyanide.com avatar

If you advertise yourself as a low level language meant to run on bare metal, you better give me control of everything, or I will die of heart disease

Ukko,
@Ukko@akko.disqordia.space avatar

@kirby ok please implement the garbage collector

kirby,
@kirby@lab.nyanide.com avatar

@Ukko I like manual memory management for bare metal scenarios actually

Ukko,
@Ukko@akko.disqordia.space avatar

@kirby ok please implement malloc

kirby,
@kirby@lab.nyanide.com avatar

@Ukko give me a couple decades to implement the heap and such

diazepam,
@diazepam@clubcyberia.co avatar

@kirby @Ukko heap is not something thats "implemented" dumbass just brk(2) writing malloc is like on page 100 of k&r its easy

kirby,
@kirby@lab.nyanide.com avatar

@diazepam @Ukko ahh whatever I have a small brain.

diazepam,
@diazepam@clubcyberia.co avatar
icedquinn,
@icedquinn@blob.cat avatar

@diazepam @Ukko @kirby i implemented TLSF once. it's not that bad.

not tried to implement immix yet though.

Ukko,
@Ukko@akko.disqordia.space avatar

@diazepam @kirby that's not bare metal, all the heavy lifting of page allocation is done by the kernel fol you and you haven't even implemented free with just brk

Ukko,
@Ukko@akko.disqordia.space avatar

@diazepam @kirby that being said K&R probably has some linked list malloc-free implementation, I don't remember

diazepam,
@diazepam@clubcyberia.co avatar

@Ukko @kirby you said "ok please implement malloc". you're now moving the goalposts by asking me to map the pages myself. I've played around with TempleOS enough to know how mempagtaskalloc works,thank you

Ukko,
@Ukko@akko.disqordia.space avatar

@diazepam @kirby i'm not moving the goalposts, the goalpost was malloc on raw metal

Ukko,
@Ukko@akko.disqordia.space avatar

@diazepam @kirby sorry next time i'll copy the messages i'm replying to and mention everything that i think would be inferred from context

icst,
@icst@clubcyberia.co avatar

@Ukko @kirby depending on what you're doing you may not really need an allocator at all. if you are just programming a microcontroller or something you could just header define a bunch of memory address blocks to specific purposes and leave it at that. imo that only breaks down if you are loading external code that has runtime memory needs

Ukko,
@Ukko@akko.disqordia.space avatar

@icst @kirby yea good point there, just having static blocks of memory is the easiest (and fastest (and most likely more bug-free))

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • Hentai
  • doujinshi
  • announcements
  • general
  • All magazines