/[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 986 by zherczeg, Fri Mar 16 12:59:30 2012 UTC revision 987 by zherczeg, Sat Jul 7 04:11:29 2012 UTC
# Line 106  SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL Line 106  SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL
106    
107  #else /* _WIN32 */  #else /* _WIN32 */
108    
109  #include "pthread.h"  #include <pthread.h>
110    
111  #if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR)  #if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR)
112    
# Line 262  SLJIT_API_FUNC_ATTRIBUTE sljit_w SLJIT_C Line 262  SLJIT_API_FUNC_ATTRIBUTE sljit_w SLJIT_C
262          }          }
263          aligned_new_limit = (new_limit + sljit_page_align) & ~sljit_page_align;          aligned_new_limit = (new_limit + sljit_page_align) & ~sljit_page_align;
264          aligned_old_limit = (stack->limit + sljit_page_align) & ~sljit_page_align;          aligned_old_limit = (stack->limit + sljit_page_align) & ~sljit_page_align;
265            /* If madvise is available, we release the unnecessary space. */
266    #if defined(POSIX_MADV_DONTNEED)
267          if (aligned_new_limit < aligned_old_limit)          if (aligned_new_limit < aligned_old_limit)
268                  posix_madvise((void*)aligned_new_limit, aligned_old_limit - aligned_new_limit, POSIX_MADV_DONTNEED);                  posix_madvise((void*)aligned_new_limit, aligned_old_limit - aligned_new_limit, POSIX_MADV_DONTNEED);
269    #elif defined(MADV_DONTNEED)
270            if (aligned_new_limit < aligned_old_limit)
271                    madvise((void*)aligned_new_limit, aligned_old_limit - aligned_new_limit, MADV_DONTNEED);
272    #endif
273          stack->limit = new_limit;          stack->limit = new_limit;
274          return 0;          return 0;
275  #endif  #endif

Legend:
Removed from v.986  
changed lines
  Added in v.987

  ViewVC Help
Powered by ViewVC 1.1.5