mirror of
https://github.com/ilya-zlobintsev/LACT.git
synced 2025-02-25 18:55:26 -06:00
fix: avoid malloc_trim non non-gnu systems (#353)
This commit is contained in:
parent
4db593c73f
commit
88e9026c78
@ -140,6 +140,7 @@ impl<'a> Handler {
|
|||||||
// Eagerly release memory
|
// Eagerly release memory
|
||||||
// `load_controllers` allocates and deallocates the entire PCI ID database,
|
// `load_controllers` allocates and deallocates the entire PCI ID database,
|
||||||
// this tells the os to release it right away, lowering measured memory usage (the actual usage is low regardless as it was already deallocated)
|
// this tells the os to release it right away, lowering measured memory usage (the actual usage is low regardless as it was already deallocated)
|
||||||
|
#[cfg(target_env = "gnu")]
|
||||||
unsafe {
|
unsafe {
|
||||||
libc::malloc_trim(0);
|
libc::malloc_trim(0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user