diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2024-06-09 21:38:45 +0200 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2024-06-09 21:38:45 +0200 |
commit | ed040c9704c69272b79a1a8ae3368f3e1fd36e35 (patch) | |
tree | 21cf6ac56aa639704ce5571ce6656c749e7ebad2 /bxgen.c | |
parent | cc1cd3f8f48dc506086715bb207dfbf175c11575 (diff) | |
download | bxgen-ed040c9704c69272b79a1a8ae3368f3e1fd36e35.zip |
Comments cleanup
Diffstat (limited to 'bxgen.c')
-rwxr-xr-x | bxgen.c | 20 |
1 files changed, 17 insertions, 3 deletions
@@ -200,6 +200,9 @@ typedef struct { // Pool, a collection of all entities. // +// NOTE +// We use one single large memory block for *everything*. +// typedef struct { i64 entity_count; @@ -255,7 +258,7 @@ void u_elf_x86_64(i64 unit, c8 const *output_file_name); // ================================================================ // -// Implementation +// Main features implementation // // ================================================================ @@ -514,8 +517,11 @@ void unit_write(entity_pool_t *pool, i64 unit, u16 target, FILE *out) { fwrite(code, 1, code_size, out); } -// Helpers implementation +// ================================================================ +// +// Helpers implementation // +// ================================================================ #ifndef DISABLE_HELPERS @@ -523,6 +529,11 @@ void unit_write(entity_pool_t *pool, i64 unit, u16 target, FILE *out) { // static entity_pool_t g_pool = { + // Statically allocate a large memory block. + // + // TODO + // Reallocate the memory block when necessary. + // .entities_capacity = MAX_ENTITY_COUNT, .entities = (entity_t[MAX_ENTITY_COUNT]) { 0 }, }; @@ -572,8 +583,11 @@ void u_elf_x86_64(i64 unit, c8 const *output_file_name) { #endif -// Example +// ================================================================ // +// Example +// +// ================================================================ #ifndef DISABLE_EXAMPLE |