diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2017-04-07 11:30:22 -0400 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2017-04-07 11:30:22 -0400 |
commit | 22bfbd1057c2fa9d5e5b2401d6b1ab60737452d9 (patch) | |
tree | 3a86025ece2992cc35fa90448e3b06795cb41618 /awk.h | |
parent | 4eb9f5be22cc4e63d0ef360ea6ba2ac850d7293e (diff) | |
download | egawk-22bfbd1057c2fa9d5e5b2401d6b1ab60737452d9.tar.gz egawk-22bfbd1057c2fa9d5e5b2401d6b1ab60737452d9.tar.bz2 egawk-22bfbd1057c2fa9d5e5b2401d6b1ab60737452d9.zip |
Patch INSTRUCTION allocator to malloc instruction blocks and eliminate leaks.
Diffstat (limited to 'awk.h')
-rw-r--r-- | awk.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1035,7 +1035,11 @@ typedef struct srcfile { // structure for INSTRUCTION pool, needed mainly for debugger typedef struct instruction_pool { #define MAX_INSTRUCTION_ALLOC 3 // we don't call bcalloc with more than this - INSTRUCTION pool[MAX_INSTRUCTION_ALLOC + 1]; + struct instruction_mem_pool { + struct instruction_block *block_list; + INSTRUCTION *free_space; // free location in active block + INSTRUCTION *free_list; + } pool[MAX_INSTRUCTION_ALLOC]; } INSTRUCTION_POOL; /* structure for execution context */ |