bors
f32459c7ba
Auto merge of #79172 - a1phyr:cold_abort, r=Mark-Simulacrum
...
Add #[cold] attribute to `std::process::abort` and `alloc::alloc::handle_alloc_error`
2020-11-23 02:25:13 +00:00
Jake Goulding
dcef5ff372
Bump bootstrap compiler version
2020-11-19 19:23:36 -05:00
Benoît du Garreau
b4c91f9a52
Add #[cold] to abort
and handle_alloc_error
2020-11-18 18:15:03 +01:00
Ralf Jung
af869c2f8d
document that __rust_alloc is also magic to our LLVM fork
2020-11-15 18:40:49 +01:00
Tim Diekmann
06e4497a04
Merge remote-tracking branch 'upstream/master' into box-alloc
2020-10-25 16:32:28 +01:00
Jonas Schievink
e34263d86a
Rollup merge of #77610 - hermitcore:dtors, r=m-ou-se
...
revise Hermit's mutex interface to support the behaviour of StaticMutex
rust-lang/rust#77147 simplifies things by splitting this Mutex type into two types matching the two use cases: StaticMutex and MovableMutex. To support the new behavior of StaticMutex, we move part of the mutex implementation into libstd.
The interface to the OS changed. Consequently, I removed a few functions, which aren't longer needed.
2020-10-24 22:39:44 +02:00
Tim Diekmann
955b37b305
Merge branch 'master' into box-alloc
2020-10-16 08:54:38 +02:00
Stefan Lankes
77d98316f4
minor changes to pass the format check
2020-10-13 12:22:18 +02:00
Stefan Lankes
bc6b2ac449
move __rg_oom to the libos to avoid duplicated symbols
2020-10-13 12:06:48 +02:00
Camelid
95221b4eb5
Use intra-doc links for links to module-level docs
2020-10-12 19:22:47 -07:00
Ralf Jung
b6bedc80c9
rename __default_lib_allocator -> __default_alloc_error_handler
2020-10-09 11:39:28 +02:00
Ralf Jung
1911d21866
also extend global allocator comment
2020-10-09 11:36:20 +02:00
Ralf Jung
6cd9b88a25
fix __rust_alloc_error_handler comment
2020-10-09 11:36:13 +02:00
Tim Diekmann
f288cd2e17
Support custom allocators in Box
...
Remove `Box::leak_with_alloc`
Add leak-test for box with allocator
Rename `AllocErr` to `AllocError` in leak-test
Add `Box::alloc` and adjust examples to use the new API
2020-10-07 03:07:02 +02:00
Harald Hoyer
cadd12b5f0
Implement Make handle_alloc_error
default to panic (for no_std + liballoc)
...
Related: https://github.com/rust-lang/rust/issues/66741
Guarded with `#![feature(default_alloc_error_handler)]` a default
`alloc_error_handler` is called, if a custom allocator is used and no
other custom `#[alloc_error_handler]` is defined.
The panic message does not contain the size anymore, because it would
pull in the fmt machinery, which would blow up the code size
significantly.
2020-10-02 09:00:29 +02:00
Jacob Hughes
5829560a68
Rename AllocErr to AllocError
2020-09-28 14:51:03 -04:00
blitzerr
2b19b14cec
a few more &mut self -> self changes
2020-09-22 21:04:31 -07:00
blitzerr
3ffd403c6b
removing &mut self for other methods of AllocRef
2020-09-22 06:22:02 -07:00
blitzerr
d9d02fa168
Changing the alloc() to accept &self instead of &mut self
2020-09-21 16:43:36 -07:00
Flying-Toast
2799aec6ab
Capitalize safety comments
2020-09-08 22:37:18 -04:00
bors
ffd59bf9c6
Auto merge of #75687 - TimDiekmann:realloc-align, r=Amanieu
...
Allow reallocation to different alignment in `AllocRef`
The allocator-wg [has decided](https://github.com/rust-lang/wg-allocators/issues/5#issuecomment-672591112 ) to support reallocating to a different alignment in `AllocRef`. For more details please see the linked issue.
r? @Amanieu
closes https://github.com/rust-lang/wg-allocators/issues/5
2020-08-26 10:44:28 +00:00
LeSeulArtichaut
1ababd8794
Use intra-doc-links in alloc
2020-08-21 00:25:25 +02:00
Tim Diekmann
438c40efa1
Allow reallocation to different alignment
2020-08-19 06:46:47 +02:00
Tim Diekmann
63d241a7b7
Make grow_impl
unsafe
2020-08-18 15:22:10 +02:00
Tim Diekmann
a9fe0ca47a
Clean up AllocRef implementation and documentation
2020-08-18 09:53:22 +02:00
Tim Diekmann
c48f784418
Fix typo in comment
2020-08-17 15:05:19 +02:00
Tim Diekmann
c619b36975
Remove fast path in reallocation for same layout sizes
2020-08-17 13:23:38 +02:00
Tim Diekmann
ab9362ad9a
Replace Memoryblock
with NonNull<[u8]>
2020-08-04 18:03:34 +02:00
Tim Diekmann
b01fbc437e
Simplify implementations of AllocRef
for Global
and System
2020-07-29 11:41:36 +02:00
Tim Diekmann
076ef66ba2
Remove in-place allocation and revert to separate methods for zeroed allocations
...
Fix docs
2020-07-28 12:41:18 +02:00
mark
2c31b45ae8
mv std libs to library/
2020-07-27 19:51:13 -05:00