pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: https://doc.rust-lang.org/nightly/std/boxed/../alloc/../../alloc/alloc/fn.handle_alloc_error.html

it(",").map(f=>``).join(""))Skip to main content

handle_alloc_error

Function handle_alloc_error 

1.36.0 (const: unstable) ยท Source
pub fn handle_alloc_error(layout: Layout) -> !
Expand description

Signals a memory allocation error.

Callers of memory allocation APIs wishing to cease execution in response to an allocation error are encouraged to call this function, rather than directly invoking panic! or similar.

This function is guaranteed to diverge (not return normally with a value), but depending on global configuration, it may either panic (resulting in unwinding or aborting as per configuration for all panics), or abort the process (with no unwinding).

The default behavior is:

  • If the binary links against std (typically the case), then print a message to standard error and abort the process. This behavior can be replaced with set_alloc_error_hook and take_alloc_error_hook. Future versions of Rust may panic by default instead.

  • If the binary does not link against std (all of its crates are marked #![no_std]), then call panic! with a message. The panic handler applies as to any panic.

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy