32

Automatic garbage collection in C is possible with libraries like libgc, but with allocppx.pl, you can just preprocess your file into generating heaps, and these heaps can be used for memory allocation. The type of GC is used, mark and sweep + reference counting. Every memory allocation MAY have a trace, and this trace can be used to 'refget' and 'refunget'. Heap items that are NULL or have 0 refs are collected via mark and sweep.

The generated code is very readable, you can just look at it to get a clue. However, this Perl document is annotated with POD so you can view it in man pages etc. I have submitted an ASCII render of the manpage in Gist.

I hope you enjoy this.

you are viewing a single comment's thread
view the rest of the comments
[-] hardkorebob@programming.dev 1 points 5 months ago

Man I C this Perl is so awesome! Thanks for this cool tool!

[-] ChubakPDP11@programming.dev 1 points 5 months ago

No problem my good man. Have fun.

[-] hardkorebob@programming.dev 1 points 5 months ago

Check out my DSL I made for Python in Shell. https://github.com/dislux-hapfyl/shimky I checked out all your projects on GitHub. You are a Super Programmer for sure.

[-] ChubakPDP11@programming.dev 0 points 5 months ago

Cool. I can't see the implementation though? Thanks a lot man. Really means a lot. @Corbin knows a lot more though. (since I called Rust a 'shitlang' I realize you may be ironic


Since Rust is more of a 'fandom' than a 'compiler', but I'm not going to offend you by assuming so. If you are truly giving me props, it's really appreciated! :D )

[-] hardkorebob@programming.dev 1 points 5 months ago

I am a n00b so I really dont have fandom. I just learning and sharing. No offense taken.

this post was submitted on 15 Apr 2024
32 points (90.0% liked)

Programming

17025 readers
124 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS