Update mem doc example formatting

This commit is contained in:
Eric Johnson
2024-03-15 12:26:01 -07:00
committed by GitHub
parent 04f0fbf23a
commit 4b7f32c287
+2 -3
View File
@@ -5,14 +5,14 @@ package mem implements various types of allocators.
An example of how to use the `Tracking_Allocator` to track subsequent allocations An example of how to use the `Tracking_Allocator` to track subsequent allocations
in your program and report leaks and bad frees: in your program and report leaks and bad frees:
```odin Example:
package foo package foo
import "core:mem" import "core:mem"
import "core:fmt" import "core:fmt"
_main :: proc() { _main :: proc() {
do stuff // do stuff
} }
main :: proc() { main :: proc() {
@@ -30,6 +30,5 @@ main :: proc() {
fmt.printf("%v allocation %p was freed badly\n", bad_free.location, bad_free.memory) fmt.printf("%v allocation %p was freed badly\n", bad_free.location, bad_free.memory)
} }
} }
```
*/ */
package mem package mem