3

AllocPP.pl is a script I authored that creates a dynamic heap (as in datatype heap, not the heap segment of the process) in your program, and these heaps are allocatable, and reallocatable, and deallocatable. It does so by preprocessing your program. It's in no way a substitution for memory management and garbage collection, but you can use it for one-off programs and tests. It has two directives, '#alloc' and '#hashfunc'. The latter is not important, just name your hash function anything. But the former is important. There can be as many heaps in your programs as possible.

There's an example, and full explanation in the Gist.

Thanks.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here
this post was submitted on 13 Feb 2024
3 points (80.0% liked)

C Programming Language

931 readers
6 users here now

Welcome to the C community!

C is quirky, flawed, and an enormous success.
... When I read commentary about suggestions for where C should go, I often think back and give thanks that it wasn't developed under the advice of a worldwide crowd.
... The only way to learn a new programming language is by writing programs in it.

© Dennis Ritchie

🌐 https://en.cppreference.com/w/c

founded 1 year ago
MODERATORS