Skip to content
Snippets Groups Projects
  1. May 20, 2018
  2. Mar 04, 2018
  3. Nov 08, 2017
  4. Sep 24, 2017
  5. Jul 22, 2017
  6. Jun 17, 2017
  7. Mar 06, 2017
  8. Jan 23, 2017
  9. Jan 17, 2017
  10. Jan 12, 2017
    • Jorge Aparicio's avatar
      fix the build (#42) · 1dad80a9
      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
      1dad80a9
  11. Dec 15, 2016
  12. Oct 23, 2016
  13. Oct 04, 2016
  14. Aug 23, 2016
    • ticki's avatar
      Make `Leak` an invaraint. · 7f6b779a
      ticki authored
      We make the `Leak` trait unsafe and consituting an invariant. Secondly,
      we implement `Leak` for all `Copy` types.
      7f6b779a
  15. Aug 21, 2016
    • ticki's avatar
      Audit all unsafes. · 5a42b783
      ticki authored
      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.
      5a42b783
    • ticki's avatar
      Add example folder. · 2cb61efb
      ticki authored
      2cb61efb
    • ticki's avatar
      Update clippy. · 6b992ccf
      ticki authored
      6b992ccf
  16. Aug 19, 2016
    • ticki's avatar
      Fix bugs in memtrimming related to the byte count. · 25c0dbe9
      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
      25c0dbe9
  17. Aug 16, 2016
    • ticki's avatar
      Update the README. · 2c55fb11
      ticki authored
      2c55fb11
    • ticki's avatar
      Multi-level logging and user configuration. · e3190491
      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.
      e3190491
  18. Aug 15, 2016
    • ticki's avatar
      OS memtrimming for the global allocator. · 8b83c9a2
      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.
      8b83c9a2
  19. Aug 14, 2016
    • ticki's avatar
      Implement BRK caching. · 998377c6
      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%.
      998377c6
  20. Aug 13, 2016
    • ticki's avatar
      Implement memtrimming for the local allocator. · f679d9ce
      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.
      f679d9ce
  21. Aug 12, 2016
  22. Aug 11, 2016
    • ticki's avatar
      Make TLS optional. · ae4fc625
      ticki authored
      This feature was requested by @jackpot51, and will be used until Redox gets full TLS support.
      ae4fc625
    • ticki's avatar
      The test suite runs! Ralloc 1.0.0 is ready! · 70104b8d
      ticki authored
      70104b8d
    • ticki's avatar
      Fix bug related to strange behavior of Arc · 5285a72b
      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).
      5285a72b
  23. Aug 10, 2016
    • ticki's avatar
      Improve logging in multiple ways. · fd7a7bc7
      ticki authored
      - Let `Writer` hold the lock.
      
      - Rename `Writer` to `LogWriter`
      
      - Fix warnings in tests.
      
      - Remove forgotten file.
      fd7a7bc7
    • ticki's avatar
      Make use of .expect() over .unwrap() · 8b438f18
      ticki authored
      It is generally considered better to do so, due to the more descriptive error messages.
      
      - Remove warnings from the minimal.rs test
      8b438f18
  24. Aug 09, 2016
Loading