- Timestamp:
- Feb 27, 2013 12:07:30 PM (12 years ago)
- Location:
- pjproject/branches/1.x
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/1.x
- Property svn:mergeinfo changed
/pjproject/trunk merged: 4298
- Property svn:mergeinfo changed
-
pjproject/branches/1.x/pjlib/include/pj/pool.h
r3553 r4395 510 510 */ 511 511 PJ_IDECL(void*) pj_pool_alloc_from_block(pj_pool_block *block, pj_size_t size); 512 PJ_DECL(void*) pj_pool_allocate_find(pj_pool_t *pool, unsignedsize);512 PJ_DECL(void*) pj_pool_allocate_find(pj_pool_t *pool, pj_size_t size); 513 513 514 514 -
pjproject/branches/1.x/pjlib/include/pj/pool_i.h
r3553 r4395 48 48 size = (size + PJ_POOL_ALIGNMENT) & ~(PJ_POOL_ALIGNMENT-1); 49 49 } 50 if (( unsigned)(block->end - block->cur) >= size) {50 if ((pj_size_t)(block->end - block->cur) >= size) { 51 51 void *ptr = block->cur; 52 52 block->cur += size; -
pjproject/branches/1.x/pjlib/src/pj/pool.c
r3553 r4395 89 89 * (depending on whether the pool is allowed to resize). 90 90 */ 91 PJ_DEF(void*) pj_pool_allocate_find(pj_pool_t *pool, unsignedsize)91 PJ_DEF(void*) pj_pool_allocate_find(pj_pool_t *pool, pj_size_t size) 92 92 { 93 93 pj_pool_block *block = pool->block_list.next; … … 122 122 size + sizeof(pj_pool_block) + PJ_POOL_ALIGNMENT) 123 123 { 124 unsignedcount;124 pj_size_t count; 125 125 count = (size + pool->increment_size + sizeof(pj_pool_block) + 126 126 PJ_POOL_ALIGNMENT) / -
pjproject/branches/1.x/pjlib/src/pj/pool_caching.c
r3553 r4395 179 179 180 180 /* Update pool manager's free capacity. */ 181 cp->capacity -= pj_pool_get_capacity(pool); 181 if (cp->capacity > pj_pool_get_capacity(pool)) { 182 cp->capacity -= pj_pool_get_capacity(pool); 183 } else { 184 cp->capacity = 0; 185 } 182 186 183 187 PJ_LOG(6, (pool->obj_name, "pool reused, size=%u", pool->capacity)); … … 200 204 { 201 205 pj_caching_pool *cp = (pj_caching_pool*)pf; 202 unsignedpool_capacity;206 pj_size_t pool_capacity; 203 207 unsigned i; 204 208
Note: See TracChangeset
for help on using the changeset viewer.