/[pcre]/code/trunk/sljit/sljitExecAllocator.c
ViewVC logotype

Diff of /code/trunk/sljit/sljitExecAllocator.c

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

revision 662 by ph10, Mon Aug 22 14:35:22 2011 UTC revision 715 by zherczeg, Sat Oct 1 06:42:38 2011 UTC
# Line 237  void sljit_free_exec(void* ptr) Line 237  void sljit_free_exec(void* ptr)
237          struct free_block* free_block;          struct free_block* free_block;
238    
239          allocator_grab_lock();          allocator_grab_lock();
240          header = AS_BLOCK_HEADER(ptr, -sizeof(struct block_header));          header = AS_BLOCK_HEADER(ptr, -(sljit_w)sizeof(struct block_header));
241          allocated_size -= header->size;          allocated_size -= header->size;
242    
243          /* Connecting free blocks together if possible. */          /* Connecting free blocks together if possible. */
244    
245          /* If header->prev_size == 0, free_block will equal to header.          /* If header->prev_size == 0, free_block will equal to header.
246             In this case, free_block->header.size will be > 0. */             In this case, free_block->header.size will be > 0. */
247          free_block = AS_FREE_BLOCK(header, -header->prev_size);          free_block = AS_FREE_BLOCK(header, -(sljit_w)header->prev_size);
248          if (SLJIT_UNLIKELY(!free_block->header.size)) {          if (SLJIT_UNLIKELY(!free_block->header.size)) {
249                  free_block->size += header->size;                  free_block->size += header->size;
250                  header = AS_BLOCK_HEADER(free_block, free_block->size);                  header = AS_BLOCK_HEADER(free_block, free_block->size);

Legend:
Removed from v.662  
changed lines
  Added in v.715

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12