Skip to content

Naive garbage collector in C with mark and sweep algorithm

Notifications You must be signed in to change notification settings

alexisvisco/garbage-collector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dezy Garbage Collector

This gc is write in C and it is a naive implementation of mark and sweep algorithm.

Sample

#include "gc.h"

void	sample(void **h)
{
	void **hello;
	void *hi;

	hello = gc_alloc(10);
	*hello = gc_alloc(11);
	*hello += 3;
	*h = *hello;
}

int		main(int argc, char *argv[])
{
	void *h;

	gc_init(&argc, 1);

	sample(&h);
	gc_alloc(1);
	
	gc_destroy();
}

About

Naive garbage collector in C with mark and sweep algorithm

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages