aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil <homan.phil@gmail.com>2022-04-12 16:21:16 -0700
committerPhil <homan.phil@gmail.com>2022-04-12 16:21:16 -0700
commit85a427fae1b717326372d9849cbfb09eaa72b6ed (patch)
tree1810f2ebb479def034bc383fa1c466deab8106c9
parent6fe185b60725700e0e60b9c5fbb8a093862baf66 (diff)
Update mem.Megabyte etc. usage
-rw-r--r--src/main.odin2
-rw-r--r--src/server/build.odin2
-rw-r--r--src/server/check.odin4
-rw-r--r--src/server/documents.odin4
4 files changed, 6 insertions, 6 deletions
diff --git a/src/main.odin b/src/main.odin
index 5bfb880..e3d3bee 100644
--- a/src/main.odin
+++ b/src/main.odin
@@ -95,7 +95,7 @@ main :: proc() {
context.logger = verbose_logger
- init_global_temporary_allocator(mem.megabytes(100))
+ init_global_temporary_allocator(mem.Megabyte*100)
run(&reader, &writer)
}
diff --git a/src/server/build.odin b/src/server/build.odin
index b4a6238..106979f 100644
--- a/src/server/build.odin
+++ b/src/server/build.odin
@@ -98,7 +98,7 @@ build_static_index :: proc(allocator := context.allocator, config: ^common.Confi
temp_arena: mem.Arena
- mem.init_arena(&temp_arena, make([]byte, mem.megabytes(100)))
+ mem.init_arena(&temp_arena, make([]byte, mem.Megabyte*100))
context.allocator = mem.arena_allocator(&temp_arena)
diff --git a/src/server/check.odin b/src/server/check.odin
index 8273084..55a6042 100644
--- a/src/server/check.odin
+++ b/src/server/check.odin
@@ -25,7 +25,7 @@ when ODIN_OS == .Windows {
}
check :: proc(uri: common.Uri, writer: ^Writer, config: ^common.Config) {
- data := make([]byte, mem.kilobytes(10), context.temp_allocator)
+ data := make([]byte, mem.Kilobyte*10, context.temp_allocator)
buffer: []byte
code: u32
@@ -228,4 +228,4 @@ when ODIN_OS == .Windows {
} else {
check :: proc(uri: common.Uri, writer: ^Writer, config: ^common.Config) {
}
-} \ No newline at end of file
+}
diff --git a/src/server/documents.odin b/src/server/documents.odin
index dfcf9fd..c177217 100644
--- a/src/server/documents.odin
+++ b/src/server/documents.odin
@@ -48,7 +48,7 @@ document_get_allocator :: proc() -> ^common.Scratch_Allocator {
return pop(&document_storage.free_allocators)
} else {
allocator := new(common.Scratch_Allocator)
- common.scratch_allocator_init(allocator, mem.megabytes(3))
+ common.scratch_allocator_init(allocator, mem.Megabyte*3)
return allocator
}
}
@@ -413,4 +413,4 @@ parse_imports :: proc(document: ^common.Document, config: ^common.Config) {
}
document.imports = imports[:]
-} \ No newline at end of file
+}