From ed36a35dbae6943b2acb4136c6d9d04f23af2af3 Mon Sep 17 00:00:00 2001 From: Joshua Liebow-Feeser Date: Mon, 26 Feb 2018 14:38:43 -0800 Subject: [PATCH] elfmalloc: Bubble up OOM errors, remove unnecessary internal code - Make many internal methods return Option rather than T and return None on OOM - Remove CoarseAllocator::backing_memory and replace it with page_size (which was all the former method was ever being used for) --- elfmalloc/CHANGELOG.md | 6 +- elfmalloc/Cargo.toml | 4 +- elfmalloc/src/alloc_impl.rs | 16 ++-- elfmalloc/src/bin/bench.rs | 7 +- elfmalloc/src/frontends.rs | 159 ++++++++++++++++++----------------- elfmalloc/src/general.rs | 163 ++++++++++++++++++------------------ elfmalloc/src/rust_alloc.rs | 52 ++++++------ elfmalloc/src/slag.rs | 103 ++++++++++------------- elfmalloc/src/sources.rs | 39 +++++---- elfmalloc/src/utils.rs | 32 ++++--- elfmalloc/travis.sh | 4 +- 11 files changed, 286 insertions(+), 299 deletions(-) diff --git a/elfmalloc/CHANGELOG.md b/elfmalloc/CHANGELOG.md index 0238fa4..605d5fe 100644 --- a/elfmalloc/CHANGELOG.md +++ b/elfmalloc/CHANGELOG.md @@ -1,4 +1,4 @@ -