Dump the requested aligment if out of memory while allocating a table.

This commit is contained in:
Boris Chiou 2017-12-19 17:00:20 -05:00
parent 2a139cebac
commit aebe2cfac2
2 changed files with 17 additions and 6 deletions

View file

@ -778,9 +778,10 @@ impl<K, V> RawTable<K, V> {
let buffer = alloc(size, alignment);
if buffer.is_null() {
use AllocationInfo;
return Err(FailedAllocationError {
reason: "out of memory when allocating RawTable",
allocation_size: Some(size),
allocation_info: Some(AllocationInfo { size, alignment }),
});
}