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
- Memory is requested but cannot be released, even when `pageReporting=true` is enabled.
22
23
-`memlock` limits vary—some WSL instances have a higher or even unlimited locked memory cap, but typically the limit is around 2GB. In my tests, it sometimes allows only 2GB, which is entirely dependent on the WSL kernel.
23
24
-`memlock` has a hard limit that seems unchangeable within WSL.
24
-
-`memlock` appears to overestimate current locked memory; repeated locking of the same memory can be counted multiple times.
25
+
-`memlock` appears to overestimate current locked memory; repeated locking of the same memory can be counted multiple times (as documented in [WSL's infiniband/user_verbs.rst](https://github.com/microsoft/WSL2-Linux-Kernel/blob/main/Documentation/infiniband/user_verbs.rst#memory-pinning)).
25
26
- Some WSL kernels are incompatible with Docker Desktop.
26
27
28
+
## Memory Management in WSL Kernels
29
+
30
+
The WSL2 kernel has specific behaviors around memory allocation and locking:
31
+
32
+
1.**Performance Monitoring Memory**:
33
+
- The `perf_event_mlock_kb` setting governs memory available for performance monitoring
34
+
- This extends the `RLIMIT_MEMLOCK` limit but only for perf_event mmap buffers
35
+
- Processes with `CAP_IPC_LOCK` capability bypass these limits
0 commit comments