Mmap Group
These functions provide helpers for safe mmap handling. More...Functions | |
Eina_Bool | eina_mmap_safety_enabled_set (Eina_Bool enabled) |
Enable or disable safe mmaped IO handling. | |
Eina_Bool | eina_mmap_safety_enabled_get (void) |
Get the enabled state of mmap safety. |
Detailed Description
These functions provide helpers for safe mmap handling.
- Since:
- 1.1.0
Function Documentation
Enable or disable safe mmaped IO handling.
- Parameters:
-
enabled The enabled state (to enable, pass EINA_TRUE)
If you disable mmap safety, the SIGBUS handler will be restored to its default handler. Note that eina_file_map_all() and eina_file_map_new() will automatically enable mmap safety as they provide an mmaped file IO layer, and rely on mmap to not fail for any part of the file.
If you set up your own SIGBUS handler, then this will effectively disable the safe mmap handling and make you liable to crashes on IO to or from such "damaged files" that would take down your process.
- Since:
- 1.1.0
References EINA_FALSE, eina_log_domain_register(), and EINA_LOG_ERR.
Referenced by eina_file_map_all(), and eina_file_map_new().
Eina_Bool eina_mmap_safety_enabled_get | ( | void | ) |
Get the enabled state of mmap safety.
- Returns:
- The safety state (EINA_TRUE if enabled)
- Since:
- 1.1.0