User Tools

Site Tools


realtime:documentation:howto:applications:memory:mlockall_globals_sample

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
realtime:documentation:howto:applications:memory:mlockall_globals_sample [2017/06/10 00:15]
jithu
realtime:documentation:howto:applications:memory:mlockall_globals_sample [2017/06/10 00:28] (current)
jithu
Line 65: Line 65:
 { {
  int unexpected_pagefaults_detected;​  int unexpected_pagefaults_detected;​
- int actual_page_size;​ 
  int lock_memory = 1;  int lock_memory = 1;
  int buff_value;  int buff_value;
Line 82: Line 81:
  }  }
  (void)dump_page_faults();​ /* Set the baseline*/  (void)dump_page_faults();​ /* Set the baseline*/
- 
- /* printf something so we avoid introducing a page fault simply 
- * by performing the potentially first printf call. 
- */ 
- actual_page_size = sysconf(_SC_PAGESIZE);​ 
- 
- printf("​Page size = %d\n", actual_page_size);​ 
- 
- (void)dump_page_faults();​ 
  
  /* From this point onwards we no longer expect any page faults */  /* From this point onwards we no longer expect any page faults */
realtime/documentation/howto/applications/memory/mlockall_globals_sample.1497053744.txt.gz ยท Last modified: 2017/06/10 00:15 by jithu