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

Disable locking in memory_region when RUSTRT_TRACK_ALLOCATIONS=0 #1302

Closed
brson opened this issue Dec 14, 2011 · 3 comments
Closed

Disable locking in memory_region when RUSTRT_TRACK_ALLOCATIONS=0 #1302

brson opened this issue Dec 14, 2011 · 3 comments
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. I-slow Issue: Problems and improvements with respect to performance of generated code.

Comments

@brson
Copy link
Contributor

brson commented Dec 14, 2011

The exchange heap uses a lock around every malloc and free, i.e. every vector and string acquires at least two locks during its lifetime. It looks like when we are not tracking allocations (now the default) there should be no need for a lock here.

@brson
Copy link
Contributor Author

brson commented Jan 15, 2012

It looks like the only locking being done now when RUSTRT_TRACK_ALLOCATIONS is on is in realloc, which is probably never used.

@brson
Copy link
Contributor Author

brson commented Feb 17, 2012

realloc is used for growing vectors

@brson
Copy link
Contributor Author

brson commented Feb 18, 2012

done.

@brson brson closed this as completed Feb 18, 2012
bjorn3 added a commit to bjorn3/rust that referenced this issue Dec 14, 2022
Allow specifying where build artifacts should be written to
coastalwhite pushed a commit to coastalwhite/rust that referenced this issue Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. I-slow Issue: Problems and improvements with respect to performance of generated code.
Projects
None yet
Development

No branches or pull requests

1 participant