This commit is contained in:
Jean-Francois Dockes 2011-05-08 08:06:58 +02:00
parent dbcfc005ef
commit e612d165d3
2 changed files with 6 additions and 10 deletions

View File

@ -1104,12 +1104,12 @@ bool CirCache::getCurrent(string& udi, string& dic, string& data)
return true; return true;
} }
void * static void *allocmem(
allocmem(void *cp, /* The array to grow. may be NULL */ void *cp, /* The array to grow. may be NULL */
int sz, /* Unit size in bytes */ int sz, /* Unit size in bytes */
int *np, /* Pointer to current allocation number */ int *np, /* Pointer to current allocation number */
int min, /* Number to allocate the first time */ int min, /* Number to allocate the first time */
int maxinc) /* Maximum increment */ int maxinc) /* Maximum increment */
{ {
if (cp == 0) { if (cp == 0) {
cp = malloc(min * sz); cp = malloc(min * sz);

View File

@ -34,10 +34,6 @@
* *
* It is assumed that the dictionary are small (they are routinely read/parsed) * It is assumed that the dictionary are small (they are routinely read/parsed)
* *
* A problem with this approach is that repetitively storing the same
* object will evict all others. This could be somewhat optimized by reusing
* the last entry if it has the same udi as the one written, but not done
* currently.
*/ */
#include <sys/types.h> #include <sys/types.h>