Ticket #60106: patch-anonymous.diff

File patch-anonymous.diff, 544 bytes (added by dubiousjim, 4 years ago)

patch MAP_ANONYMOUS to fallback to MAP_ANON

  • src/large_pages/node_large_page.cc

    old new  
    4949#include <sstream>
    5050#include <vector>
    5151
     52#if !defined(MAP_ANONYMOUS)
     53  #define NO_MAP_ANONYMOUS
     54  #if defined(MAP_ANON)
     55    #define MAP_ANONYMOUS MAP_ANON
     56  #else
     57    #define MAP_ANONYMOUS 0
     58  #endif
     59#endif
     60
    5261// The functions in this file map the text segment of node into 2M pages.
    5362// The algorithm is simple
    5463// Find the text region of node binary in memory