Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nokonoko1203 committed Aug 19, 2024
1 parent abf8507 commit 3fefc06
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions atlas-packer/src/texture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ fn get_cache_size() -> Result<usize, String> {
match mem_info() {
Ok(mem) => {
let total_memory = mem.total as usize * 1024;
// 15% of total memory
let cache_size = (total_memory as f64 * 0.15) as usize;
Ok(cache_size.clamp(MIN_CACHE_SIZE, MAX_CACHE_SIZE))
}
Expand Down

0 comments on commit 3fefc06

Please sign in to comment.