28 Available memory space for DGS nodes

MaxDgsTotalByteSize

A CSpace records the max number of total bytes of the DGS nodes to be retained after each eviction. This property can be get/set


    $adt+ CSpace
    {
        // Get/Set the max number of bytes to be taken by the DGS nodes after each eviction
        // for the eviction queue with the given index
        ssize_t GetMaxDgsTotalByteSize(ssize_t evictionQueueIndex) const;
        void SetMaxDgsTotalByteSize(ssize_t evictionQueueIndex, ssize_t maxTotalBytes);
        ...
    };

It can also be get/set using TLS for the CSpace. E.g.


    ceda::SetMaxDgsTotalByteSize(DgsEvictionQueueIndex_SystemMemory, 64*1024*1024);

There might be ways to make the evictor responsive to application requirements. E.g. could use a sequence number on DGS nodes to measure time since last accessed, and for example avoid evicting any objects accessed in the last 10 seconds.