Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2015
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. <<<<<<< HEAD
  2. =======
  3. #endif /* MEMPROTECT */
  4.  
  5. void *newp = NULL;
  6. size_t alloc_size = 0;
  7. #ifdef DEBUG
  8. char *oldsbrk = (char *)sbrk(0), *newsbrk = NULL;
  9. #endif
  10. if (ats_hugepage_enabled()) {
  11. alloc_size = INK_ALIGN(f->chunk_size * f->type_size, ats_hugepage_size());
  12. newp = ats_alloc_hugepage(alloc_size);
  13. }
  14. >>>>>>> asf/6.0.x
  15.  
  16. if (newp == NULL) {
  17. alloc_size = INK_ALIGN(f->chunk_size * f->type_size, ats_pagesize());
  18. newp = ats_memalign(ats_pagesize(), alloc_size);
  19. }
  20. <<<<<<< HEAD
  21.  
  22. ats_madvise((caddr_t)newp, alloc_size, f->advice);
  23. =======
  24. ats_madvise((caddr_t)newp, alloc_size, f->advice);
  25. fl_memadd(f->chunk_size * type_size);
  26. #ifdef DEBUG
  27. newsbrk = (char *)sbrk(0);
  28. ink_atomic_increment(&fastmemtotal, newsbrk - oldsbrk);
  29. /* printf("fastmem %d, %d, %d\n", f->chunk_size * type_size,
  30. newsbrk - oldsbrk, fastmemtotal); */
  31. #endif
  32. >>>>>>> asf/6.0.x
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement