Skip to content

a garbage collector powered by machine learning and written in rust

Notifications You must be signed in to change notification settings

Vengarioth/genetic-gc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

genetic-gc

a machine learning approach to garbage collection

Build Status

State of the GC

  1. make it work
  2. make it pretty
  3. make it fast

State of the model

  1. make it work
  2. make it pretty
  3. make it fast

API

// TypeInformation and TestStruct omitted
let type_information = TypeInformation{};
let mut gc = GC::new(type_information);
let size = std::mem::size_of::<TestStruct>();
let address_one = gc.allocate(size).unwrap();
let address_two = gc.allocate(size).unwrap();

gc.add_root(address_one);
gc.collect();

// address_one will still be alive since it's a root reference
assert!(gc.is_address_valid(address_one));

// address_two will be gone since nothing refers to it
assert!(!gc.is_address_valid(address_two));

Licence

MIT

About

a garbage collector powered by machine learning and written in rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages