comments
This commit is contained in:
parent
dbcfc005ef
commit
e612d165d3
@ -1104,12 +1104,12 @@ bool CirCache::getCurrent(string& udi, string& dic, string& data)
|
||||
return true;
|
||||
}
|
||||
|
||||
void *
|
||||
allocmem(void *cp, /* The array to grow. may be NULL */
|
||||
int sz, /* Unit size in bytes */
|
||||
int *np, /* Pointer to current allocation number */
|
||||
int min, /* Number to allocate the first time */
|
||||
int maxinc) /* Maximum increment */
|
||||
static void *allocmem(
|
||||
void *cp, /* The array to grow. may be NULL */
|
||||
int sz, /* Unit size in bytes */
|
||||
int *np, /* Pointer to current allocation number */
|
||||
int min, /* Number to allocate the first time */
|
||||
int maxinc) /* Maximum increment */
|
||||
{
|
||||
if (cp == 0) {
|
||||
cp = malloc(min * sz);
|
||||
|
||||
@ -34,10 +34,6 @@
|
||||
*
|
||||
* 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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user