Changeset 2123 for pjproject/trunk/pjlib/src/pj/pool_dbg.c
- Timestamp:
- Jul 12, 2008 9:31:34 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/pool_dbg.c
r2039 r2123 20 20 #include <pj/string.h> 21 21 22 #if PJ_ POOL_DEBUG22 #if PJ_HAS_POOL_ALT_API 23 23 24 24 #if PJ_HAS_MALLOC_H … … 42 42 43 43 44 struct pj_pool_mem45 {46 struct pj_pool_mem *next;47 48 /* data follows immediately */49 };50 51 52 struct pj_pool_t53 {54 struct pj_pool_mem *first_mem;55 pj_size_t used_size;56 pj_pool_callback *cb;57 };58 59 44 60 45 int PJ_NO_MEMORY_EXCEPTION; 61 46 47 48 PJ_DEF(int) pj_NO_MEMORY_EXCEPTION() 49 { 50 return PJ_NO_MEMORY_EXCEPTION; 51 } 62 52 63 53 /* Create pool */ … … 74 64 PJ_UNUSED_ARG(line); 75 65 PJ_UNUSED_ARG(factory); 76 PJ_UNUSED_ARG(name);77 66 PJ_UNUSED_ARG(initial_size); 78 67 PJ_UNUSED_ARG(increment_size); … … 82 71 return NULL; 83 72 73 if (name) { 74 pj_ansi_strncpy(pool->obj_name, name, sizeof(pool->obj_name)); 75 pool->obj_name[sizeof(pool->obj_name)-1] = '\0'; 76 } else { 77 strcpy(pool->obj_name, "altpool"); 78 } 79 80 pool->factory = NULL; 84 81 pool->first_mem = NULL; 85 82 pool->used_size = 0; … … 185 182 pj_pool_t *pool, pj_size_t sz) 186 183 { 187 return pj_pool_calloc_imp(file, line, pool, 1, sz); 184 return pj_pool_calloc_imp(file, line, pool, 1, sz); 188 185 } 189 186 190 187 191 #endif /* PJ_POOL_DEBUG */ 188 189 #endif /* PJ_HAS_POOL_ALT_API */
Note: See TracChangeset
for help on using the changeset viewer.