reserve-commit-chain arenas

This commit is contained in:
Allen Webster
2021-09-17 18:07:38 -07:00
parent cbd755852d
commit 0a07520fac
11 changed files with 181 additions and 72 deletions
@@ -36,7 +36,7 @@ static void CleanUp(void); // Runs at the end of generation.
int main(int argument_count, char **arguments)
{
// setup the global arena
arena = MD_ArenaAlloc(1ull << 40);
arena = MD_ArenaAlloc();
// parse all files passed to the command line
MD_b32 failed_parse = 0;
+1 -1
View File
@@ -14,7 +14,7 @@ static MD_Arena *arena = 0;
int
main(int argc, char **argv){
// setup the global arena
arena = MD_ArenaAlloc(1ull << 40);
arena = MD_ArenaAlloc();
// parse a string
MD_String8 name = MD_S8Lit("<name>");
+1 -3
View File
@@ -22,9 +22,7 @@ static MD_Arena *arena = 0;
int main(int argc, char **argv)
{
// setup the global arena
// @notes This code makes an arena with a 1 terabyte reserve which works as
// long as we only have one or a few arenas.
arena = MD_ArenaAlloc(1ull << 40);
arena = MD_ArenaAlloc();
// parse all files passed to the command line
MD_Node *list = MD_MakeList(arena);
+1 -1
View File
@@ -57,7 +57,7 @@ int
main(int argc, char **argv)
{
// setup the global arena
arena = MD_ArenaAlloc(1ull << 40);
arena = MD_ArenaAlloc();
// parse all files passed to the command line
MD_Node *list = MD_MakeList(arena);
+1 -1
View File
@@ -20,7 +20,7 @@ static MD_Arena *arena = 0;
int main(int argc, char **argv)
{
// setup the global arena
arena = MD_ArenaAlloc(1ull << 40);
arena = MD_ArenaAlloc();
// parse all files passed to the command line
MD_Node *list = MD_MakeList(arena);