src/server/util/pool_pvt.h

changeset 40
56cda23f48d4
parent 14
b8bf95b39952
child 415
d938228c382e
--- a/src/server/util/pool_pvt.h	Sun Dec 30 15:49:44 2012 +0100
+++ b/src/server/util/pool_pvt.h	Mon Dec 31 00:07:52 2012 +0100
@@ -36,6 +36,7 @@
 
 #ifndef BASE_POOL_H
 #include "pool.h"
+#include <inttypes.h>
 #endif /* BASE_POOL_H */
 
 /*
@@ -53,7 +54,7 @@
 #endif
 
 /* Define POOL_GLOBAL_STATISTICS to get global pool statistics */
-#define POOL_GLOBAL_STATISTICS
+//define POOL_GLOBAL_STATISTICS // TODO: redefine
 
 /*
  * When POOL_ZERO_DEBUG is defined, overwrite the contents of freed
@@ -109,9 +110,9 @@
 
 typedef struct pool_config_t pool_config_t;
 struct pool_config_t {
-    PRUint32 block_size;   /* size of blocks to allocate */
-    PRUint32 retain_size;  /* maximum bytes kept on per-pool free list */
-    PRUint32 retain_num;   /* maximum blocks kept on per-pool free list */
+    int32_t block_size;   /* size of blocks to allocate */
+    int32_t retain_size;  /* maximum bytes kept on per-pool free list */
+    int32_t retain_num;   /* maximum blocks kept on per-pool free list */
 };
 
 #define POOL_CONFIG_INIT { \
@@ -149,8 +150,8 @@
     block_t  *curr_block;       /* current block being used */
     block_t  *used_blocks;      /* blocks that are all used up */
     block_t  *free_blocks;      /* blocks that are free */
-    PRUint32  free_size;        /* number of bytes in free_blocks */
-    PRUint32  free_num;         /* number of blocks in free_blocks */
+    int32_t  free_size;        /* number of bytes in free_blocks */
+    int32_t  free_num;         /* number of blocks in free_blocks */
     size_t    size;             /* size of memory in pool */
     pool_t   *next;             /* known_pools list */
 #ifdef PER_POOL_STATISTICS
@@ -160,10 +161,10 @@
 
 typedef struct pool_global_stats_t pool_global_stats_t;
 struct pool_global_stats_t {
-    PRLock   *lock;        /* lock for access to poolList */
+    //PRLock   *lock;        /* lock for access to poolList */ // TODO: remove
     pool_t   *poolList;    /* list of known pools */
-    PRUint32  createCnt;   /* count of pools created */
-    PRUint32  destroyCnt;  /* count of pools destroyed */
+    int32_t  createCnt;   /* count of pools created */
+    int32_t  destroyCnt;  /* count of pools destroyed */
 #ifdef POOL_GLOBAL_STATISTICS
     PRUint32  blkAlloc;    /* count of block allocations from heap */
     PRUint32  blkFree;     /* count of blocks freed to heap */

mercurial