-
Notifications
You must be signed in to change notification settings - Fork 0
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
address() class use causes memory leak #4
Comments
Are you sure about this? I ran with this trace: https://www.cs.utexas.edu/~fussell/courses/cs352.fall98/Homework/cc1.din.Z and Valgrind doesn't think there are any leaks:
|
When you pass to The read/write functions use the copy from the stack frame and it is cleaned up when that frame is removed. When you pass these around from the read/write functions, you're not passing pointers or addresses, so it looks like you're copying out to other functions, too. |
Also I don't think Address() is even necessary if we move index/offset/tag parse responsibility to the cache ( #1 ) |
creating new instances of the address class for passing around addresses causes memory leaks due to used, no-longer-referenced, and not deleted address instances
address class should likely be converted to a static class with static method for convenient address calculations given cache parameters, with no actual instances of address class
The text was updated successfully, but these errors were encountered: