You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -106,6 +106,18 @@ This will reduce GLib memory appetites by reducing the number of malloc arenas
106
106
that it can create. By default GLib creates one are per thread, and this would
107
107
follow to memory fragmentation.
108
108
109
+
### Jemalloc
110
+
If the arena option doesn't help, you can try replacing the standard allocator with `jemalloc`,
111
+
which emphasizes fragmentation avoidance and scalable concurrency support.
112
+
113
+
To do this, you need to install the `libjemalloc-dev` package.
114
+
And pass the following flags for build command:
115
+
116
+
```
117
+
CGO_CFLAGS="-fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free" CGO_LDFLAGS="-ljemalloc" go build
118
+
```
119
+
120
+
109
121
## Contributing
110
122
111
123
Feel free to file issues or create pull requests. See this [guide on contributing](https://github.com/davidbyttow/govips/blob/master/CONTRIBUTING.md) for more information.
0 commit comments