Remove malloc_trim with musl
This commit is contained in:
parent
e56e0ae279
commit
d34a45ec83
@ -8,6 +8,9 @@ TDLight is 100% compatible with tdlib, if you don't use the sqlite database.
|
||||
TDLight can clean itself and release some ram to the OS if you want. Look at **TdApi.OptimizeMemory** in "Modified features" paragraph to see how.
|
||||
### Constant memory usage
|
||||
TDLight if used with care doesn't grow in memory usage with time. Look at **TdApi.OptimizeMemory** in "Modified features" paragraph to see how
|
||||
|
||||
![memory usage](info/memory-usage.jpg)
|
||||
|
||||
### Custom options
|
||||
We added some options:
|
||||
* **disable_minithumbnails** (true/false) This setting removes minithumbnails everywhere. It reduces memory usage because tdlib keeps them in RAM.
|
||||
|
BIN
info/memory-usage.jpg
Normal file
BIN
info/memory-usage.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 173 KiB |
@ -178,7 +178,9 @@ void MemoryManager::clean_memory(bool full, Promise<Unit> promise) const {
|
||||
td_->file_manager_->memory_cleanup();
|
||||
|
||||
#ifdef __linux__
|
||||
malloc_trim(0);
|
||||
#if defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(__MUSL__)
|
||||
malloc_trim(0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
promise.set_value(Unit());
|
||||
|
Loading…
Reference in New Issue
Block a user