/[pcre]/code/branches/pcre16/sljit/sljitExecAllocator.c
ViewVC logotype

Diff of /code/branches/pcre16/sljit/sljitExecAllocator.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 781 by zherczeg, Sat Dec 3 07:58:30 2011 UTC revision 809 by zherczeg, Mon Dec 19 11:04:45 2011 UTC
# Line 263  SLJIT_API_FUNC_ATTRIBUTE void sljit_free Line 263  SLJIT_API_FUNC_ATTRIBUTE void sljit_free
263                  header->prev_size = free_block->size;                  header->prev_size = free_block->size;
264          }          }
265    
266            /* The whole chunk is free. */
267          if (SLJIT_UNLIKELY(!free_block->header.prev_size && header->size == 1)) {          if (SLJIT_UNLIKELY(!free_block->header.prev_size && header->size == 1)) {
268                    /* If this block is freed, we still have (allocated_size / 2) free space. */
269                  if (total_size - free_block->size > (allocated_size * 3 / 2)) {                  if (total_size - free_block->size > (allocated_size * 3 / 2)) {
270                            total_size -= free_block->size;
271                          sljit_remove_free_block(free_block);                          sljit_remove_free_block(free_block);
272                          free_chunk(free_block, free_block->size + sizeof(struct block_header));                          free_chunk(free_block, free_block->size + sizeof(struct block_header));
273                  }                  }

Legend:
Removed from v.781  
changed lines
  Added in v.809

  ViewVC Help
Powered by ViewVC 1.1.5