(trunk) #1521 "memory cache to reduce disk IO" -- commit block-cache-rc1.diff to trunk for the nightlies.

This commit is contained in:
Charles Kerr
2010-06-19 14:25:11 +00:00
parent dbcd1c942f
commit e70bebf930
17 changed files with 525 additions and 33 deletions

View File

@@ -65,6 +65,9 @@ static inline void* tr_ptrArrayBack( tr_ptrArray * array )
: NULL;
}
void tr_ptrArrayErase( tr_ptrArray * t, int begin, int end );
/** @brief Peek at the array pointer and its size, for easy iteration */
void** tr_ptrArrayPeek( tr_ptrArray * array, int * size );
@@ -100,6 +103,11 @@ static inline tr_bool tr_ptrArrayEmpty( const tr_ptrArray * a )
return tr_ptrArraySize(a) == 0;
}
int tr_ptrArrayLowerBound( const tr_ptrArray * array,
const void * key,
int compare( const void * arrayItem, const void * key ),
tr_bool * exact_match );
/** @brief Insert a pointer into the array at the position determined by the sort function
@return the index of the stored pointer */
int tr_ptrArrayInsertSorted( tr_ptrArray * array,