예제 #1
0
파일: blobcache.c 프로젝트: tommie/showtime
static uint64_t
blobcache_compute_maxsize(uint64_t csize)
{
    uint64_t avail = arch_cache_avail_bytes() + csize;
    avail = MAX(BLOB_CACHE_MINSIZE, MIN(avail / 10, BLOB_CACHE_MAXSIZE));
    return avail;
}
예제 #2
0
파일: blobcache.c 프로젝트: Hr-/showtime
static uint64_t 
blobcache_compute_size(uint64_t csize)
{
  uint64_t avail, maxsize;

  avail = arch_cache_avail_bytes() + csize;
  maxsize = avail / 10;

  if(maxsize < 10 * 1000 * 1000)
    maxsize  = 10 * 1000 * 1000;

  if(maxsize > 1000 * 1000 * 1000)
    maxsize  = 1000 * 1000 * 1000;
  return maxsize;
}