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
Plan9 memory allocator (sysAlloc/sysFree) does not actually free memory. It can free only the last allocated block.
Most of the memory in runtime is persistent so it did not hit us very badly.
However, there are several cases where runtime grows arrays by factor of 2, e.g. alloc 4K; alloc 8K; free 4K; alloc 16K; free 8K and so on. Also execution tracer allocates a bunch of 64K blocks and frees them when tracing stops. These will lead to leaks whenever you trace your server.
The easiest thing to do is to add a freelist of blocks of size 64K only (in sysFree/sysAlloc). This will eliminate the tracer leaks.
The more comprehensive fix is to implement a sorted freelist with coalescing and splitting.
Plan9 memory allocator (sysAlloc/sysFree) does not actually free memory. It can free only the last allocated block.
Most of the memory in runtime is persistent so it did not hit us very badly.
However, there are several cases where runtime grows arrays by factor of 2, e.g. alloc 4K; alloc 8K; free 4K; alloc 16K; free 8K and so on. Also execution tracer allocates a bunch of 64K blocks and frees them when tracing stops. These will lead to leaks whenever you trace your server.
The easiest thing to do is to add a freelist of blocks of size 64K only (in sysFree/sysAlloc). This will eliminate the tracer leaks.
The more comprehensive fix is to implement a sorted freelist with coalescing and splitting.
@0intro @ality
The text was updated successfully, but these errors were encountered: