File tree 2 files changed +11
-0
lines changed
2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -228,6 +228,10 @@ In case of Linux it can be done without any code changes using the `LD_PRELOAD`
228
228
$ LD_PRELOAD=/usr/lib/libumf_proxy.so myprogram
229
229
```
230
230
231
+ The memory used by the proxy memory allocator is mmap'ed:
232
+ 1 ) with the ` MAP_PRIVATE ` flag by default or
233
+ 2 ) with the ` MAP_SHARED ` flag only if the ` UMF_PROXY ` environment variable contains the ` page.disposition=shared ` string.
234
+
231
235
#### Windows
232
236
233
237
In case of Windows it requires:
Original file line number Diff line number Diff line change @@ -111,6 +111,13 @@ void proxy_lib_create_common(void) {
111
111
umfOsMemoryProviderParamsDefault ();
112
112
enum umf_result_t umf_result ;
113
113
114
+ #ifndef _WIN32
115
+ if (util_env_var_has_str ("UMF_PROXY" , "page.disposition=shared" )) {
116
+ LOG_DEBUG ("proxy_lib: using the MAP_SHARED flag" );
117
+ os_params .flag = UMF_MEM_MAP_SHARED ;
118
+ }
119
+ #endif
120
+
114
121
umf_result = umfMemoryProviderCreate (umfOsMemoryProviderOps (), & os_params ,
115
122
& OS_memory_provider );
116
123
if (umf_result != UMF_RESULT_SUCCESS ) {
You can’t perform that action at this time.
0 commit comments