zenoh icon indicating copy to clipboard operation
zenoh copied to clipboard

Move shared-memory free-list management out of shared memory segment

Open kydos opened this issue 4 years ago • 1 comments

The current implementation of zenoh shared memory allocators retrieves the memory for dealing with free list on the shared memory segment. This decision was taken at the time when we considered that a reference dropping to zero would cause a chunk to go back to the free list. However we opted to go for mark and sweep garbage collection that does not require processes to coordinate while operating on the free-list. A a consequence only the process owing the shared-memory segment will do the garbage collection and thus all administration data can be kept on the heap as opposed to the shared memory. Thus we should simplify the implementation by using plain rust containers to keep shared memory bookkeeping and allocate these on the heap. This will not only simplify the code but also avoid using shared memory for administration and devoting it completely to user data.

kydos avatar Apr 16 '21 17:04 kydos

This first commit simplifies the code and improves the allocator algorithm. Before closing the issue we need to implement defragmentation.

kydos avatar Apr 19 '21 01:04 kydos