aboutsummaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2016-09-23 14:59:58 +0100
committerGinger Bill <bill@gingerbill.org>2016-09-23 14:59:58 +0100
commita31bab5aae10757f5029b00e39beb0e3815b92b1 (patch)
treeb7d2f888cc553f4d6e4b47ff1470c303c5d05c7e /code
parentee0aa7b9de907e70e00ca3ab891087c2ee86a31b (diff)
Unicode file loading; push_allocator & push_context
Diffstat (limited to 'code')
-rw-r--r--code/demo.odin16
-rw-r--r--code/test.odin1
2 files changed, 14 insertions, 3 deletions
diff --git a/code/demo.odin b/code/demo.odin
index 4df748394..482733dc7 100644
--- a/code/demo.odin
+++ b/code/demo.odin
@@ -1,19 +1,31 @@
#import "fmt.odin"
#import "os.odin"
+#import "mem.odin"
// #import "http_test.odin" as ht
// #import "game.odin" as game
// #import "punity.odin" as pn
main :: proc() {
+
+ arena: mem.Arena
+ mem.init_arena_from_context(^arena, 1000)
+ defer mem.free_arena(^arena)
+
+ push_allocator mem.arena_allocator(^arena) {
+ x := new(int)
+ x^ = 1337
+ fmt.println(x^)
+ }
+
+
// struct_padding()
// bounds_checking()
// type_introspection()
// any_type()
// crazy_introspection()
- namespaces_and_files()
+ // namespaces_and_files()
// miscellany()
-
// ht.run()
// game.run()
// {
diff --git a/code/test.odin b/code/test.odin
index 8748ab3b5..76dbf0468 100644
--- a/code/test.odin
+++ b/code/test.odin
@@ -33,4 +33,3 @@ thing :: proc() {
thing :: proc() {
println("Hello5!")
}*/
-