/[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 1511 by zherczeg, Tue Sep 30 06:35:20 2014 UTC revision 1512 by zherczeg, Sun Nov 9 07:27:16 2014 UTC
# Line 211  SLJIT_API_FUNC_ATTRIBUTE struct sljit_st Line 211  SLJIT_API_FUNC_ATTRIBUTE struct sljit_st
211          SYSTEM_INFO si;          SYSTEM_INFO si;
212  #endif  #endif
213    
214            SLJIT_UNUSED_ARG(allocator_data);
215          if (limit > max_limit || limit < 1)          if (limit > max_limit || limit < 1)
216                  return NULL;                  return NULL;
217    
# Line 239  SLJIT_API_FUNC_ATTRIBUTE struct sljit_st Line 240  SLJIT_API_FUNC_ATTRIBUTE struct sljit_st
240  #ifdef _WIN32  #ifdef _WIN32
241          base.ptr = VirtualAlloc(NULL, max_limit, MEM_RESERVE, PAGE_READWRITE);          base.ptr = VirtualAlloc(NULL, max_limit, MEM_RESERVE, PAGE_READWRITE);
242          if (!base.ptr) {          if (!base.ptr) {
243                  SLJIT_FREE(stack);                  SLJIT_FREE(stack, allocator_data);
244                  return NULL;                  return NULL;
245          }          }
246          stack->base = base.uw;          stack->base = base.uw;
247          stack->limit = stack->base;          stack->limit = stack->base;
248          stack->max_limit = stack->base + max_limit;          stack->max_limit = stack->base + max_limit;
249          if (sljit_stack_resize(stack, stack->base + limit)) {          if (sljit_stack_resize(stack, stack->base + limit)) {
250                  sljit_free_stack(stack);                  sljit_free_stack(stack, allocator_data);
251                  return NULL;                  return NULL;
252          }          }
253  #else  #else
# Line 255  SLJIT_API_FUNC_ATTRIBUTE struct sljit_st Line 256  SLJIT_API_FUNC_ATTRIBUTE struct sljit_st
256  #else  #else
257          if (dev_zero < 0) {          if (dev_zero < 0) {
258                  if (open_dev_zero()) {                  if (open_dev_zero()) {
259                          SLJIT_FREE(stack);                          SLJIT_FREE(stack, allocator_data);
260                          return NULL;                          return NULL;
261                  }                  }
262          }          }
# Line 277  SLJIT_API_FUNC_ATTRIBUTE struct sljit_st Line 278  SLJIT_API_FUNC_ATTRIBUTE struct sljit_st
278    
279  SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_free_stack(struct sljit_stack* stack, void *allocator_data)  SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_free_stack(struct sljit_stack* stack, void *allocator_data)
280  {  {
281            SLJIT_UNUSED_ARG(allocator_data);
282  #ifdef _WIN32  #ifdef _WIN32
283          VirtualFree((void*)stack->base, 0, MEM_RELEASE);          VirtualFree((void*)stack->base, 0, MEM_RELEASE);
284  #else  #else

Legend:
Removed from v.1511  
changed lines
  Added in v.1512

  ViewVC Help
Powered by ViewVC 1.1.5