Skip to content
/ sandbox-c Public template

πŸ’Ό πŸ‡¨ A portable C Development Environment for experimentation and glory.

License

Notifications You must be signed in to change notification settings

bryborge/sandbox-c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Sandbox (C Edition)

A portable "C" Development Environment for experimentation and glory.

βš™οΈ Dependencies

πŸ”§ Up and Running

These instructions assume you have the above dependencies installed, configured, and running.

  1. Spin up the container.

    podman compose up -d
  2. Optional: Enter the container.

    podman compose exec sandbox-c bash

βš™οΈ Build System

This project uses the Meson build system.

  1. Configure the build directory.

    meson setup build
  2. Compile the build.

    meson compile -C build
  3. Run the compiled artifact.

    ./build/demo
    

βœ… Testing

To run the test suite (after compiling), run the following command.

meson test -C build -v

πŸ› Debugging / Profiling

This project uses Valgrind for debugging and profiling.

  1. Build with debug info and compile.

    meson setup build -Dbuildtype=debug
    meson compile -C build
  2. Look for memory errors and leaks (Memcheck).

    valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --error-exitcode=1 ./build/demo
  3. Thread / data race debugging (Helgrind).

    valgrind --tool=helgrind --error-exitcode=1 ./build/demo
  4. CPU profiling (Callgrind).

    valgrind --tool=callgrind ./build/demo

    Analyze:

    callgrind_annotate --threshold=99 callgrind.out.* | less
  1. Heap profiling over time (Massif).

    valgrind --tool=massif ./build/demo

    Analyze:

    ms_print massif.out.* | less

πŸ“š Resources

About

πŸ’Ό πŸ‡¨ A portable C Development Environment for experimentation and glory.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published