~ubuntu-branches/ubuntu/utopic/suricata/utopic

« back to all changes in this revision

Viewing changes to src/util-pool.c

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Chifflier
  • Date: 2011-07-27 08:20:25 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20110727082025-bm6nrhrijpmmt2xt
Tags: 1.0.5-1
ImportedĀ UpstreamĀ versionĀ 1.0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
Pool *PoolInit(uint32_t size, uint32_t prealloc_size, void *(*Alloc)(void *), void *AllocData, void (*Free)(void *))
57
57
{
58
58
    Pool *p = NULL;
 
59
    uint32_t u32 = 0;
59
60
 
60
61
    if (Alloc == NULL) {
61
62
        //printf("ERROR: PoolInit no Hash function\n");
78
79
    p->Free  = Free;
79
80
 
80
81
    /* alloc the buckets and place them in the empty list */
81
 
    uint32_t u32 = 0;
82
82
    for (u32 = 0; u32 < size; u32++) {
83
83
        /* populate pool */
84
84
        PoolBucket *pb = SCMalloc(sizeof(PoolBucket));