Changeset 3081 for pjproject/trunk/pjlib/src/pj/pool.c
- Timestamp:
- Jan 29, 2010 10:10:49 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/pool.c
r2963 r3081 213 213 /* Create the first block from the memory. */ 214 214 block = (pj_pool_block*) (buffer + sizeof(*pool)); 215 block-> cur = block->buf = ((unsigned char*)block) + sizeof(pj_pool_block);215 block->buf = ((unsigned char*)block) + sizeof(pj_pool_block); 216 216 block->end = buffer + initial_size; 217 218 /* Set the start pointer, aligning it as needed */ 219 block->cur = (unsigned char*) 220 (((unsigned long)block->buf + PJ_POOL_ALIGNMENT - 1) & 221 ~(PJ_POOL_ALIGNMENT - 1)); 222 217 223 pj_list_insert_after(&pool->block_list, block); 218 224 … … 255 261 256 262 block = pool->block_list.next; 257 block->cur = block->buf; 263 264 /* Set the start pointer, aligning it as needed */ 265 block->cur = (unsigned char*) 266 (((unsigned long)block->buf + PJ_POOL_ALIGNMENT - 1) & 267 ~(PJ_POOL_ALIGNMENT - 1)); 268 258 269 pool->capacity = block->end - (unsigned char*)pool; 259 270 }
Note: See TracChangeset
for help on using the changeset viewer.