Changeset 466 in flair-src for trunk/lib/FlairSimulator/src/Gui_impl.cpp


Ignore:
Timestamp:
Mar 9, 2022, 10:29:38 AM (3 years ago)
Author:
Sanahuja Guillaume
Message:

unlock memory in simulator to avoid mmap problems when running simulator as non root

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairSimulator/src/Gui_impl.cpp

    r365 r466  
    2929#include <unistd.h>
    3030#include <sstream>
     31#include <sys/mman.h>
    3132
    3233using namespace irr;
     
    8485  this->scene_width = scene_width;
    8586  this->scene_height = scene_height;
     87 
     88  //unlock memory for GL simulator, otherwise it can cause problems when running simlator as non root
     89  //(mmap can fail)
     90  //memory was locked by FrameworkManager_impl constructor
     91  munlockall();
    8692
    8793  device = createDevice(driver_type, dimension2d<u32>(app_width, app_height),16, false, false, false);
Note: See TracChangeset for help on using the changeset viewer.