S SmartDocs
Series: Robotaxi-OperatingSystem-Hardware-Interfaces c 13 lines · Updated 2026-02-03

mlock_demo.c

Robotaxi-OperatingSystem-Hardware-Interfaces/class001_bundle/mlock_demo.c

#define _GNU_SOURCE
#include <sys/mman.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(){
    size_t sz = 100UL<<20; // 100MB
    void *p = malloc(sz);
    if(!p){perror("malloc"); return 1;}
    if(mlock(p, sz)!=0){perror("mlock");}
    printf("Locked 100MB. Check VmLck in /proc/%d/status\n", getpid());
    getchar();
}

Related articles

Robotaxi-OperatingSystem-Hardware-Interfaces c Updated 2026-02-03

alloc.c

alloc.c — c source code from the Robotaxi-OperatingSystem-Hardware-Interfaces learning materials (Robotaxi-OperatingSystem-Hardware-Interfaces/class001_bundle/alloc.c).

Read article →
Robotaxi-OperatingSystem-Hardware-Interfaces c Updated 2026-02-03

hello.c

hello.c — c source code from the Robotaxi-OperatingSystem-Hardware-Interfaces learning materials (Robotaxi-OperatingSystem-Hardware-Interfaces/class001_bundle/hello.c).

Read article →
Robotaxi-OperatingSystem-Hardware-Interfaces python Updated 2026-03-12

debug_perf.py

debug_perf.py — python source code from the Robotaxi-OperatingSystem-Hardware-Interfaces learning materials (Robotaxi-OperatingSystem-Hardware-Interfaces/fmc3-robotics-main/projects/RoboBrain2.0/debug_perf.py).

Read article →
Robotaxi-OperatingSystem-Hardware-Interfaces python Updated 2026-03-12

inference.py

inference.py — python source code from the Robotaxi-OperatingSystem-Hardware-Interfaces learning materials (Robotaxi-OperatingSystem-Hardware-Interfaces/fmc3-robotics-main/projects/RoboBrain2.0/inference.py).

Read article →
Robotaxi-OperatingSystem-Hardware-Interfaces bash Updated 2026-03-12

startup.sh

startup.sh — bash source code from the Robotaxi-OperatingSystem-Hardware-Interfaces learning materials (Robotaxi-OperatingSystem-Hardware-Interfaces/fmc3-robotics-main/projects/RoboBrain2.0/startup.sh).

Read article →
Robotaxi-OperatingSystem-Hardware-Interfaces python Updated 2026-03-12

run.py

run.py — python source code from the Robotaxi-OperatingSystem-Hardware-Interfaces learning materials (Robotaxi-OperatingSystem-Hardware-Interfaces/fmc3-robotics-main/projects/RoboOS/deploy/run.py).

Read article →