This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| 
                    realtime:documentation:howto:applications:memory:mlockall_stack_sample [2017/06/09 01:59] jithu code modified as per coding conventions  | 
                
                    realtime:documentation:howto:applications:memory:mlockall_stack_sample [2017/06/10 00:41] (current) jithu  | 
            ||
|---|---|---|---|
| Line 232: | Line 232: | ||
| printf("Current and future memory locked in RAM\n"); | printf("Current and future memory locked in RAM\n"); | ||
| } | } | ||
| - | /* printf something so we avoid introducing a page fault simply by | ||
| - | * performing the potentially first printf call. | ||
| - | */ | ||
| - | printf("Page size = %d\n", page_size); | ||
| (void)dump_page_faults(); /* Set the baseline */ | (void)dump_page_faults(); /* Set the baseline */ | ||
| - | /* From this point onwards we no longer expect to have any | + | /* | 
| + | * From this point onwards we no longer expect to have any | ||
| * page faults for currently allocated memory. | * page faults for currently allocated memory. | ||
| */ | */ | ||
| Line 260: | Line 257: | ||
| "of thread 1. This is unexpected!\n"); | "of thread 1. This is unexpected!\n"); | ||
| } | } | ||
| - | /* Thread 1 has not yet terminated, meaning that thread 2 will not | + | /* | 
| + | * Thread 1 has not yet terminated, meaning that thread 2 will not | ||
| * reuse the same (locked) stack region. | * reuse the same (locked) stack region. | ||
| */ | */ | ||