[package] name = "zerogc-simple" description = "Lightweight mark/sweep collector for zerogc." version = "0.2.0-alpha.7" authors = ["Techcable "] repository = "https://github.com/DuckLogic/zerogc" readme = "../../README.md" license = "MIT" edition = "2018" [dependencies] inherent = "1" zerogc = { path = "../..", version = "0.2.0-alpha.6" } once_cell = { version = "1.5", optional = true } # Shared impl zerogc-context = { path = "../context", version = "0.2.0-alpha.6", default-features = false } zerogc-derive = { path = "../derive", version = "0.2.0-alpha.6" } # Concurrency parking_lot = { version = "0.11", optional = true } # Logging slog = "2.7" [features] default = [ "small-object-arenas", # Without this, allocating small objects is slow "sync", # Thread-safety by default "multiple-collectors", # By default, allow multiple collectors ] # Use very fast dedicated arenas for small objects. # This makes allocation much faster # Time spent in malloc (even in heavy workloads) drops to near zero # This can also improve memory significantly by avoiding per-object overheads # # However, it increases code complexity and is more # agressive (memory wise) then delegating all work to std::alloc # TODO: Return unused memory to the operating systems # TODO: Thread-local caching (make arenas fast again) small-object-arenas = ["once_cell"] # Use recursion to implicitly track the grey stack # This risks stack overflow at a possible performance gain # See commit 9a9634d68a4933d implicit-grey-stack = [] # Allow multiple threads to access the garbage collector # by creating a seperate context for each. # # This can increase overhead by requiring communication between threads. sync = ["zerogc-context/sync", "parking_lot"] # Allow multiple collectors to exist at once # Otherwise, there's a single global collector (useful in VMs) # # Even if multiple collectors are enabled, pointers from # one collector can't be safely mixed with other collectors. multiple-collectors = [] [[test]] name = "errors" required-features = ["sync"] [dev-dependencies] # Used for examples :) zerogc-derive = { path = "../derive" } # Used for binary_trees parallel example rayon = "1.3" slog-term = "2.6" # Used to test the 'error' type anyhow = "1" thiserror = "1" zerogc = { path = "../..", features = ["errors"] }