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

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

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

revision 1321 by zherczeg, Thu Nov 1 15:21:27 2012 UTC revision 1322 by zherczeg, Wed May 1 19:42:31 2013 UTC
# Line 315  SLJIT_API_FUNC_ATTRIBUTE sljit_sw SLJIT_ Line 315  SLJIT_API_FUNC_ATTRIBUTE sljit_sw SLJIT_
315          aligned_new_limit = (new_limit + sljit_page_align) & ~sljit_page_align;          aligned_new_limit = (new_limit + sljit_page_align) & ~sljit_page_align;
316          aligned_old_limit = (stack->limit + sljit_page_align) & ~sljit_page_align;          aligned_old_limit = (stack->limit + sljit_page_align) & ~sljit_page_align;
317          /* If madvise is available, we release the unnecessary space. */          /* If madvise is available, we release the unnecessary space. */
318  #if defined(POSIX_MADV_DONTNEED)  #if defined(MADV_DONTNEED)
         if (aligned_new_limit < aligned_old_limit)  
                 posix_madvise((void*)aligned_new_limit, aligned_old_limit - aligned_new_limit, POSIX_MADV_DONTNEED);  
 #elif defined(MADV_DONTNEED)  
319          if (aligned_new_limit < aligned_old_limit)          if (aligned_new_limit < aligned_old_limit)
320                  madvise((void*)aligned_new_limit, aligned_old_limit - aligned_new_limit, MADV_DONTNEED);                  madvise((void*)aligned_new_limit, aligned_old_limit - aligned_new_limit, MADV_DONTNEED);
321    #elif defined(POSIX_MADV_DONTNEED)
322            if (aligned_new_limit < aligned_old_limit)
323                    posix_madvise((void*)aligned_new_limit, aligned_old_limit - aligned_new_limit, POSIX_MADV_DONTNEED);
324  #endif  #endif
325          stack->limit = new_limit;          stack->limit = new_limit;
326          return 0;          return 0;

Legend:
Removed from v.1321  
changed lines
  Added in v.1322

  ViewVC Help
Powered by ViewVC 1.1.5