Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Garbage collector #319

Open
gogo40 opened this issue Mar 11, 2013 · 3 comments
Open

Garbage collector #319

gogo40 opened this issue Mar 11, 2013 · 3 comments
Assignees
Labels
Milestone

Comments

@gogo40
Copy link
Member

gogo40 commented Mar 11, 2013

Hi! I did an improvement in the @muriloadriano code to garbage collector (https://www.dropbox.com/sh/mnhvoick9nihnye/kzRmByA-1d/garbage_collector). Currently, I'm using a cache to reduce new and delete calls. I did a test and the execution times are:

GC - CACHE AND MARK NON-RECURSIVE
Bye 1000000
SIZE : 1000024

real    0m0.691s
user    0m0.688s
sys 0m0.000s

GC - ORIGINAL MURILO IMPLEMENTATIOn

Bye 1000000
SIZE : 1000024

real    0m8.450s
user    0m2.200s
sys 0m6.232s

Now, I'll try using a parallel thread to manage the collector call.

@ghost ghost assigned muriloadriano Mar 11, 2013
@muriloadriano
Copy link
Member

A good way to implement async garbage collection:

http://en.wikipedia.org/wiki/Garbage_collection_(computer_science)#Tri-color_marking

@muriloadriano
Copy link
Member

Not sure if that cache will improve that much if the size of the objects vary too much.

@gogo40
Copy link
Member Author

gogo40 commented Mar 12, 2013

I can do some tests. There are an invalid read in the original implementation of the gc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants