Skip to content

Colorized and table formatted memory tracker for allocations and bad frees

Notifications You must be signed in to change notification settings

OnlyXuul/tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Colorized and table formatted memory tracker for debugging Odin programs. Full credit to Odin (gingerbill) and Karl Zylinski for the original version of the non-formatted version.

This package depends on afmt package.

Create folder "tracker" in the "odin/shared" folder
copy tracker.odin to the "tracker" folder

Add to your project
import "shared:tracker"

Copy to the top of main:
when ODIN_DEBUG {
t := tracker.init_tracker()
context.allocator = tracker.tracking_allocator(&t)
defer tracker.print_and_destroy_tracker(&t)
}

Build with:
odin build . -debug

By default, the tracker will panic on bad frees. To override this use:
odin build . -debug -define:panic=false

Output For No Problems Alt text

Output Detailing Problems Found Alt text

About

Colorized and table formatted memory tracker for allocations and bad frees

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages