/[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 1194 by zherczeg, Sun Oct 28 05:50:36 2012 UTC revision 1195 by zherczeg, Thu Nov 1 15:21:27 2012 UTC
# Line 246  SLJIT_API_FUNC_ATTRIBUTE void sljit_free Line 246  SLJIT_API_FUNC_ATTRIBUTE void sljit_free
246          struct free_block* free_block;          struct free_block* free_block;
247    
248          allocator_grab_lock();          allocator_grab_lock();
249          header = AS_BLOCK_HEADER(ptr, -(sljit_w)sizeof(struct block_header));          header = AS_BLOCK_HEADER(ptr, -(sljit_sw)sizeof(struct block_header));
250          allocated_size -= header->size;          allocated_size -= header->size;
251    
252          /* Connecting free blocks together if possible. */          /* Connecting free blocks together if possible. */
253    
254          /* If header->prev_size == 0, free_block will equal to header.          /* If header->prev_size == 0, free_block will equal to header.
255             In this case, free_block->header.size will be > 0. */             In this case, free_block->header.size will be > 0. */
256          free_block = AS_FREE_BLOCK(header, -(sljit_w)header->prev_size);          free_block = AS_FREE_BLOCK(header, -(sljit_sw)header->prev_size);
257          if (SLJIT_UNLIKELY(!free_block->header.size)) {          if (SLJIT_UNLIKELY(!free_block->header.size)) {
258                  free_block->size += header->size;                  free_block->size += header->size;
259                  header = AS_BLOCK_HEADER(free_block, free_block->size);                  header = AS_BLOCK_HEADER(free_block, free_block->size);

Legend:
Removed from v.1194  
changed lines
  Added in v.1195

  ViewVC Help
Powered by ViewVC 1.1.5