f9b8c35f | 04-Jul-2018 |
Jeremy Soller <jackpot51@gmail.com> |
Disable Bookkeeper::check for relibc |
afb62216 | 03-Jul-2018 |
Jeremy Soller <jackpot51@gmail.com> |
Merge remote-tracking branch 'origin/bugfixes' |
573b77db | 30-Jun-2018 |
Tommie Levy <thomas.a.levy@gmail.com> |
Memcpy in the new buffer after reallocating the vec
Reserve enough mem that you have enough left over for the next reserve Disable memtrim, because it breaks the assumption that reserve will not cha
Memcpy in the new buffer after reallocating the vec
Reserve enough mem that you have enough left over for the next reserve Disable memtrim, because it breaks the assumption that reserve will not change the exsting vector contents.
Tests are still hanging on linux. I think our mutex impl may be broken when under contention.
show more ...
|
30b79524 | 30-Jun-2018 |
Tom Almeida <tommoa256@gmail.com> |
Revert "Added 'oom' lang-item so downstream crates don't complain about missing 'oom' symbol"
This reverts commit 7d7e3137bb856752c25fe1a3e86d64debbcceee0 |
7d7e3137 | 30-Jun-2018 |
Tom Almeida <tommoa256@gmail.com> |
Added 'oom' lang-item so downstream crates don't complain about missing 'oom' symbol |
ad6a0aff | 23-Jun-2018 |
Tom Almeida <tommoa256@gmail.com> |
Fix another case where #45 would occur |
647a67f9 | 22-Jun-2018 |
Tom Almeida <tommoa256@gmail.com> |
Fixed occasional failing of 'partial_realloc'. This is because our bookkeeper's vec gets too cramped and should (theoretically) need resizing |
37dbab72 | 22-Jun-2018 |
Tom Almeida <tommoa256@gmail.com> |
Removed a warning when compiling with 'log' feature |
6c4ac791 | 22-Jun-2018 |
Tom Almeida <tommoa256@gmail.com> |
Fixed TLS incorrect total_bytes -- #45 |
92ca1d73 | 21-Jun-2018 |
Tom Almeida <tommoa256@gmail.com> |
Run rustfmt on all files |
cccbe119 | 21-Jun-2018 |
Tom Almeida <tommoa256@gmail.com> |
Update implementation for nightly 19/6/2018 |
0f721639 | 20-May-2018 |
Valentin Lorentz <progval+git@progval.net> |
Fix sbrk to actually return the *old* break. |
cda52ae5 | 08-Nov-2017 |
Ian Douglas Scott <ian@iandouglasscott.com> |
Make tests compile |
cd8d627e | 08-Nov-2017 |
Ian Douglas Scott <ian@iandouglasscott.com> |
Use new allocator API, and otherwise update for new Rust
- New allocator API - Remove the "allocator" feature, which should be unnecessary due to how the new allocator API works - NonZero no longer
Use new allocator API, and otherwise update for new Rust
- New allocator API - Remove the "allocator" feature, which should be unnecessary due to how the new allocator API works - NonZero no longer implements Deref (https://github.com/rust-lang/rust/pull/41064) - NonZero::new() returns an Option; use NonZero::new_unchecked() - Thread locals are no longer 'static (https://github.com/rust-lang/rust/pull/43746) - Changes to feature flags - Use unsafe to access extern static (https://github.com/rust-lang/rust/issues/36247)
show more ...
|
1dad80a9 | 12-Jan-2017 |
Jorge Aparicio <japaricious@gmail.com> |
fix the build (#42)
* fix the build
the `unborrow!` macro is need in the block and bookkeeper modules
* cfg(tls) away impl LocalAllocator
as the struct LocalAllocator is not available when
fix the build (#42)
* fix the build
the `unborrow!` macro is need in the block and bookkeeper modules
* cfg(tls) away impl LocalAllocator
as the struct LocalAllocator is not available when the tls feature is
disabled
show more ...
|
8523d5df | 15-Dec-2016 |
ticki <ticki@users.noreply.github.com> |
Merge branch 'master' of github.com:redox-os/ralloc |
afaad8d3 | 15-Dec-2016 |
ticki <ticki@users.noreply.github.com> |
Remove the `nborrow` dependency and give the macro its own module.
To avoid linking hell. |
7d73b18a | 23-Oct-2016 |
David Teller <david.teller@univ-orleans.fr> |
Remove feature question_mark. (#38)
This feature is now in Rust stable, so adding !#[feature(question_mark)] is now useless and causes a warning. |
7f6b779a | 23-Aug-2016 |
ticki <ticki@users.noreply.github.com> |
Make `Leak` an invaraint.
We make the `Leak` trait unsafe and consituting an invariant. Secondly, we implement `Leak` for all `Copy` types. |
5a42b783 | 21-Aug-2016 |
ticki <ticki@users.noreply.github.com> |
Audit all unsafes.
We equip all `unsafe` blocks with a timestamped confirmations of an audit. Whenever a block is changed, it should be removed until a new audit is made.
The format of these messag
Audit all unsafes.
We equip all `unsafe` blocks with a timestamped confirmations of an audit. Whenever a block is changed, it should be removed until a new audit is made.
The format of these messages is:
``` LAST AUDIT: yyyy-mm-dd (Username) ```
Close #28.
show more ...
|
25c0dbe9 | 19-Aug-2016 |
ticki <ticki@users.noreply.github.com> |
Fix bugs in memtrimming related to the byte count.
Various issues (like premature checks) were present in the byte count beforehand. We fix these.
- Fix invalid byte counts. - Add a `LOCAL_MEMTRIM_
Fix bugs in memtrimming related to the byte count.
Various issues (like premature checks) were present in the byte count beforehand. We fix these.
- Fix invalid byte counts. - Add a `LOCAL_MEMTRIM_STOP` constant to `shim`, which serves for the minimum memtrimmed allocator (i.e. it will stop when the byte count is below this value). - Add more logs. - Add assertions about libc interference with SBRK.
There is still some problem when running
show more ...
|
e3190491 | 16-Aug-2016 |
ticki <ticki@users.noreply.github.com> |
Multi-level logging and user configuration.
This commit is a complete revision of `shim`. Anything which is configurable of nature is now moved to `shim` allowing complete customizability of `ralloc
Multi-level logging and user configuration.
This commit is a complete revision of `shim`. Anything which is configurable of nature is now moved to `shim` allowing complete customizability of `ralloc`.
But it doesn't end there!
The logs got quite messy before due to the classical TMI problem. We solve this by adding multiple "log levels" each describing a different class of importance.
- Add multi-level logging. - Move each component of shim into distinct modules. - Add allocator canonicalization to `shim`. - Add adjustable constant to `shim`. - Add default OOM handler to `shim`. - Add logging to everything. - Remove the `libc_write` module and add it to `log` instead. - Add colourful OOM message. - Tweak the allocator canonicalization strategy. - Rename the `log!` macro to `bk_log!`, and use the old name for the generalized logging macro. - Remove the `unsafe_no_brk_lock` feature, due to being unsafe in multithreaded environment (and in singlethreaded ones, `unsafe_no_mutex_lock` is sufficient). - Remove the `sys` module in favor of direct `shim` imports.
show more ...
|
8b83c9a2 | 15-Aug-2016 |
ticki <ticki@users.noreply.github.com> |
OS memtrimming for the global allocator.
This commit introduces OS/BRK memtrimming, in which the memory from the global allocator is freed to the OS when a certain limit is reached. This avoids long
OS memtrimming for the global allocator.
This commit introduces OS/BRK memtrimming, in which the memory from the global allocator is freed to the OS when a certain limit is reached. This avoids long-running processes from acquiring too much memory from the system and never releasing it again.
- Implement safe BRK releasing.
show more ...
|
998377c6 | 14-Aug-2016 |
ticki <ticki@users.noreply.github.com> |
Implement BRK caching.
Previously, BRK was making two syscalls in glibc due to requesting the program break and then setting it. This is fixed by caching this program break.
This commit prepares fo
Implement BRK caching.
Previously, BRK was making two syscalls in glibc due to requesting the program break and then setting it. This is fixed by caching this program break.
This commit prepares for OS memtrimming, which needs a well-defined thread-safe function.
- Completely remove libc dependency due to allocation behavior being uncertain in non-glibc implementation (the POSIX standard tells little to nothing about this). - Move the default OOM handler to shim. - Give an error message in the default OOM handler. - Add SBRK benchmark.
This should improve performance of fresh allocations by 30-40%.
show more ...
|
f679d9ce | 13-Aug-2016 |
ticki <ticki@users.noreply.github.com> |
Implement memtrimming for the local allocator.
Memtrimming (releasing memory to a higher allocator or the OS) is important for avoiding accumulation. This commit introduces memtrimming for local all
Implement memtrimming for the local allocator.
Memtrimming (releasing memory to a higher allocator or the OS) is important for avoiding accumulation. This commit introduces memtrimming for local allocators to avoid fragmentation and stubs accumulating in local allocators.
By keeping track of how many bytes that are currently in the bookkeeper, we can estimate the level of fragmentation and thus decide if we should memtrim (i.e. free to the global allocator).
The next thing is to implement global memtrimming.
We do a few minor changes as well:
- Refactor for_each to use a new method, `pop_iter` a iterator popping elements of the vector. - Introduce a new field `total_bytes` keeping track of the number of bytes in the bookkeeper. - Move the initializers of the allocators to methods defined on the type itself. - Introduce an `on_new_memory()` method, which is called whenever new memory is introduced.
show more ...
|