S SmartDocs
系列: Robotaxi-OperatingSystem-Hardware-Interfaces c 14 行 · 更新于 2026-02-03

alloc.c

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

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
int main(int argc, char **argv){
    size_t mb = (argc>1)?strtoul(argv[1], NULL, 10):200; // MB
    size_t bytes = mb * 1024UL * 1024UL;
    char *buf = malloc(bytes);
    if(!buf){perror("malloc"); return 1;}
    for(size_t i=0;i<bytes;i+=4096) buf[i] = 1; // touch each page
    printf("Allocated & touched %zu MB. PID=%d\n", mb, getpid());
    getchar(); // keep process alive to inspect pmap
    return 0;
}

相关文章

Robotaxi-OperatingSystem-Hardware-Interfaces c 更新于 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).

阅读文章 →
Robotaxi-OperatingSystem-Hardware-Interfaces c 更新于 2026-02-03

mlock_demo.c

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

阅读文章 →
Robotaxi-OperatingSystem-Hardware-Interfaces python 更新于 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).

阅读文章 →
Robotaxi-OperatingSystem-Hardware-Interfaces python 更新于 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).

阅读文章 →
Robotaxi-OperatingSystem-Hardware-Interfaces bash 更新于 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).

阅读文章 →
Robotaxi-OperatingSystem-Hardware-Interfaces python 更新于 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).

阅读文章 →