- May 20, 2018
-
-
Jeremy Soller authored
Fix sbrk to actually return the *old* break.
-
Valentin Lorentz authored
-
- Mar 04, 2018
-
-
Jeremy Soller authored
-
- Nov 08, 2017
-
-
Jeremy Soller authored
Use new allocator API, and otherwise update for new Rust
-
Ian Douglas Scott authored
-
Ian Douglas Scott authored
- 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)
-
- Sep 24, 2017
-
-
Jeremy Soller authored
MacOSX is not supported anymore
-
Jeremy Soller authored
Grammar fix
-
- Jul 22, 2017
-
-
Ivan Enderlin authored
-
- Jun 17, 2017
-
-
Luca Barbato authored
it is missing some needed syscalls.
-
- Mar 06, 2017
-
-
Oliver Schneider authored
fixes #37
-
- Jan 23, 2017
-
-
Edwin Amsler authored
-
- Jan 17, 2017
-
-
Jorge Aparicio authored
by switching from the syscall crate to the sc crate. The sc crate is a fork of the syscall crate that adds supports for several other platforms.
-
- Jan 12, 2017
-
-
Jorge Aparicio authored
* 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
-
- Dec 15, 2016
- Oct 23, 2016
-
-
This feature is now in Rust stable, so adding !#[feature(question_mark)] is now useless and causes a warning.
-
- Oct 04, 2016
-
-
ticki authored
-
- Aug 23, 2016
-
-
ticki authored
We make the `Leak` trait unsafe and consituting an invariant. Secondly, we implement `Leak` for all `Copy` types.
-
- Aug 21, 2016
- Aug 19, 2016
-
-
ticki authored
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
-
- Aug 16, 2016
-
-
ticki authored
-
ticki authored
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.
-
- Aug 15, 2016
-
-
ticki authored
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.
-
- Aug 14, 2016
-
-
ticki authored
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%.
-
- Aug 13, 2016
-
-
ticki authored
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.
-
- Aug 12, 2016
-
-
ticki authored
Previously, `push` might oversee a possible merge and thus increasing fragmentation. This commit (by @nilset) fixes that. - Ignore slow tests.
-
ticki authored
Patch by @nilset.
-
ticki authored
Requested on Reddit.
-
Bruce Mitchener authored
-
Taylor Cramer authored
-
ticki authored
We add first-class debugger support by providing functions for marking memory blocks uninitialized/free to the debugger. The default implementation is wired to valgrind, but it can easily be replaced.
-
- Aug 11, 2016
-
-
ticki authored
This feature was requested by @jackpot51, and will be used until Redox gets full TLS support.
-
ticki authored
-
ticki authored
Apparently, atomically reference counted objects would allow destructors to run after the allocator had been deinitialized. To fix this, we make sure the allocator is never disabled, but simply will fallback to the global alloctor when deinitialized. This also fixes an important bug in TLS keys (i.e. the order of the thread dtors were unknown). We introduce a few other smaller changes as well: - Use uniform convention for todos. Add a colon after the TODO, and start with capital letter, and end with punctuation. - Fix broken tests which would free a larger buffer than allocated. - Remove debug_tools in favor of planned Valgrind compatibility. - Remove `LazyInit`'s unreachable state. - Replace `get_allocator` with a macro (due to the lack of generic closures).
-
- Aug 10, 2016
- Aug 09, 2016
-
-
ticki authored
Weird stuff. Ain't high, ain't drunk, but shit's happening, and it is fucked up. I can smell rainbows.
-