History log of /relibc/ralloc/tests/ (Results 1 – 21 of 21)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
14e275d823-Jun-2018 Tom Almeida <tommoa256@gmail.com>

Made sure all tests and benches actually use ralloc as their global allocator

92ca1d7321-Jun-2018 Tom Almeida <tommoa256@gmail.com>

Run rustfmt on all files

0f72163920-May-2018 Valentin Lorentz <progval+git@progval.net>

Fix sbrk to actually return the *old* break.

2b7af37012-Aug-2016 ticki <ticki@users.noreply.github.com>

Fix edge-case where `reserve` pushes an adjacent block.

Previously, `push` might oversee a possible merge and thus increasing fragmentation. This commit (by @nilset) fixes that.

- Ignore slow tests.

ae4fc62511-Aug-2016 ticki <ticki@users.noreply.github.com>

Make TLS optional.

This feature was requested by @jackpot51, and will be used until Redox gets full TLS support.

5285a72b11-Aug-2016 ticki <ticki@users.noreply.github.com>

Fix bug related to strange behavior of Arc

Apparently, atomically reference counted objects would allow destructors to run after the allocator had been deinitialized. To fix this, we make sure the a

Fix bug related to strange behavior of Arc

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).

show more ...

fd7a7bc710-Aug-2016 ticki <ticki@users.noreply.github.com>

Improve logging in multiple ways.

- Let `Writer` hold the lock.

- Rename `Writer` to `LogWriter`

- Fix warnings in tests.

- Remove forgotten file.

8b438f1810-Aug-2016 ticki <ticki@users.noreply.github.com>

Make use of .expect() over .unwrap()

It is generally considered better to do so, due to the more descriptive error messages.

- Remove warnings from the minimal.rs test

96acdffa09-Aug-2016 ticki <ticki@users.noreply.github.com>

Add Arc test, triggering an unusual bug.

Weird stuff. Ain't high, ain't drunk, but shit's happening, and it is fucked up. I can smell rainbows.

9cef1dfa09-Aug-2016 ticki <ticki@users.noreply.github.com>

Add a minimal single-threaded example.

863a1ece06-Aug-2016 ticki <ticki@users.noreply.github.com>

Fix unsoundness in TLS

The API was unsound due to allowing leakage of a reference to another thread. We solve this in a manner similar to libstd, by using a `with` method, which temporarily gives ac

Fix unsoundness in TLS

The API was unsound due to allowing leakage of a reference to another thread. We solve this in a manner similar to libstd, by using a `with` method, which temporarily gives access through a reference by taking a closure. Related to [RFC 1705](https://github.com/rust-lang/rfcs/pull/1705).

show more ...

cdec4b0e03-Aug-2016 ticki <ticki@users.noreply.github.com>

Ralloc 1.0.0: A trait-based local/global allocator model.

- Use a trait-based approach to local/global allocators. In particular,
we make what was previously provided by `Bookkeeper` to a trait in

Ralloc 1.0.0: A trait-based local/global allocator model.

- Use a trait-based approach to local/global allocators. In particular,
we make what was previously provided by `Bookkeeper` to a trait in
which the custom methods are overriden.
- Enable ralloc-based block list reallocation. Instead of using BRK for
this, we allow the allocator itself to manage the bookkeeper's
capacity. This is done by adding the guarantee of the vector's
capacity always being greater than or equal two the length plus two.
- Remove the `UniCell` primitive and provides a `MoveCell` primitive
instead.
- Move `Bookkeeper`-specific methods to `Bookkeeper`'s impl instead of
the `Allocator` trait.
- Introduce the `LazyInit` primitive, which provides functionality
similar to the `lazy_static` crate. In particular, it allows for an
initializer to be executed if initialization is needed. This is used
for allocating the initial segment.
- Use lonely method for allocation API (abolish `lock`, which is no
longer relevant due to the new model).
- Due to an unsoundness discovered by @nilset, we remove the correctness
guarantee of the "seperate deallocation" example.
- Remove microcaches. This method is outdated with the new model. In the
future, it will likely be replaced by a small-allocation LL arena.
- Wrap TLS variables in a newtype that guarantees against crossthread
leakage.
- Update the tests.

show more ...

f56d86e519-Jul-2016 ticki <ticki@users.noreply.github.com>

Small fixes

6e3426f318-Jul-2016 ticki <ticki@users.noreply.github.com>

Improve testing suite, improve security, improve logging, global OOM handler, prepare for performance pass

This patch has the main intend of preparing for the performance pass, along with a set of o

Improve testing suite, improve security, improve logging, global OOM handler, prepare for performance pass

This patch has the main intend of preparing for the performance pass, along with a set of other changes:

- Add acid (generative) testing: Set up chaotic and unusual environment for testing, hopefully detecting edge case bugs. This includes doing allocation inbetween tests and setting up multiple threads for detecting data races.

- Fix casts: Unchecked casts can - in some cases - lead to security issues. In particular, you might be able to shrink the data segment of the process by resulting in overflowing casts.

- Global OOM handler: The OOM handler is no longer allocator-specific. This is due to a planned new model, where we utilize global-to-local allocators through thread-local storage.

- Use ranges instead of tuples: Ranges describes the behavior in a more precise manner, and furthermore it is non-affine, allowing for detection of certain logic bugs.

- Better logging: Now range cursors can be given, with the output syntax []. Cursors are defined through the Cursor trait.

- General style improvement: Various cleanups of Nilset's code (shame, shame, shame! jk)

- Replace certain cfg-flags with cfg-macros: This allows all-path-checking, e.g. erroring even when the flag isn't set.

- Make SBRK unsafe: Due to breakage when shrinking the segment, SBRK is now marked unsafe.

- Enable more clippy lints: These includes checking the castings and other things. Many false-positives are generated. These needs to be manually fixed by allow-attributes.

- Update the README: Just a bunch of new rambling onreview process etc.

- New tests: This includes many new tests including tests for very big allocations and partial allocations.

Fix #27.

show more ...

e681f6dd01-Jul-2016 Thomas Levy <tychomonger@gmail.com>

Make it all work. (#25)

* Fix the iterator moving left in find

Set each empty block passed to the left edge of the block being inserted

* Add new invariants, fix many bugs. It works!

Empty

Make it all work. (#25)

* Fix the iterator moving left in find

Set each empty block passed to the left edge of the block being inserted

* Add new invariants, fix many bugs. It works!

Empty blocks must have same address as block to the right.
No trailing empty blocks at end of vec.
Search for left edge and right edge of block to find potential merges.
Fix insert, now extends the lenghth of the vec.
Fix refill, now copies over old vector's contents into new mem.
Fix Block eq comparision, now ignores size and meets rules for Ord
Fix alloc, place back aligned blocks which dont fit instead of leaking

show more ...

146a5db906-Jun-2016 ticki <ticki@users.noreply.github.com>

Add thread local allocators, BRK locks, platform independency, lock reuse, local allocators, more tests, abort-as-panic, additional benches, provide an Allocator struct, memleak detection, fix bugs r

Add thread local allocators, BRK locks, platform independency, lock reuse, local allocators, more tests, abort-as-panic, additional benches, provide an Allocator struct, memleak detection, fix bugs related to the is_empty function, micro caches (implemented, but not wired up), a prelude, allocator specific OOM handler, fix bound checks, Leak trait, fix bug in Mutex.

show more ...

b68418f625-May-2016 ticki <ticki@users.noreply.github.com>

Add Vec<Box<T>> test

4b65baa324-May-2016 ticki <ticki@users.noreply.github.com>

Ralloc is now ready for production use: Fix all currently known issues, rewrite large parts of the allocator, move unsafes to seperate abstractions (e.g., remove pointer arithemtics), add direct meth

Ralloc is now ready for production use: Fix all currently known issues, rewrite large parts of the allocator, move unsafes to seperate abstractions (e.g., remove pointer arithemtics), add direct method, add vector primitive, update README, add TODO, add pointer primitive, more debug_assertions, more tests

show more ...

7e2039cf16-May-2016 ticki <ticki@users.noreply.github.com>

Fix memory leaks, fix OOB bug when freeing the first block, rename BlockList to BlockVec, add memory leak assertions, allow inplace reallocations in segment end, add segment bound checks, improve ini

Fix memory leaks, fix OOB bug when freeing the first block, rename BlockList to BlockVec, add memory leak assertions, allow inplace reallocations in segment end, add segment bound checks, improve initial allocation, and more stuff I forget.

show more ...

819ed48421-Apr-2016 ticki <ticki@users.noreply.github.com>

Avoid certain recursive allocations

a022e08f19-Apr-2016 ticki <ticki@users.noreply.github.com>

Allocator is ready, provide linking symbols, complete bookkeeping, proper merges, safe multithreading, OOM handling (+ custom handlers), system primitives, add extensive testing.

TODO: Fix the fail

Allocator is ready, provide linking symbols, complete bookkeeping, proper merges, safe multithreading, OOM handling (+ custom handlers), system primitives, add extensive testing.

TODO: Fix the fail cases.

show more ...