mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-09 15:38:13 -07:00
Merge pull request #161 from henry-blip/master
Expose vips cache memory management functions.
This commit is contained in:
commit
eb5bcd9585
1 changed files with 16 additions and 0 deletions
16
vips.go
16
vips.go
|
|
@ -130,6 +130,22 @@ func Shutdown() {
|
|||
}
|
||||
}
|
||||
|
||||
// VipsCacheSetMaxMem Sets the maximum amount of tracked memory allowed before the vips operation cache
|
||||
// begins to drop entries.
|
||||
func VipsCacheSetMaxMem(maxCacheMem int) {
|
||||
C.vips_cache_set_max_mem(C.size_t(maxCacheMem))
|
||||
}
|
||||
|
||||
// VipsCacheSetMax sets the maximum number of operations to keep in the vips operation cache.
|
||||
func VipsCacheSetMax(maxCacheSize int) {
|
||||
C.vips_cache_set_max(C.int(maxCacheSize))
|
||||
}
|
||||
|
||||
// VipsCacheDropAll drops the vips operation cache, freeing the allocated memory.
|
||||
func VipsCacheDropAll() {
|
||||
C.vips_cache_drop_all()
|
||||
}
|
||||
|
||||
// VipsDebugInfo outputs to stdout libvips collected data. Useful for debugging.
|
||||
func VipsDebugInfo() {
|
||||
C.im__print_all()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue