diff options
Diffstat (limited to 'development.md')
-rw-r--r-- | development.md | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/development.md b/development.md index 6021532..255c09a 100644 --- a/development.md +++ b/development.md @@ -11,20 +11,19 @@ start. toc's memory management works using an allocator which never frees anything. This is because most of toc's data is kept around until the end of the program anyways. -Use the allocator for "permanent" allocations, and err\_malloc/calloc/realloc for temporary +Use the allocator for "permanent" allocations, and err\_malloc/err\_calloc/err\_realloc for temporary allocations (to avoid having it take up space for a long time). -Because of this, memory leaks can happen if the compilation fails at any point, but they +Memory leaks can happen if the compilation fails at any point, but they should not happen if the compilation succeeds. Usually if there's an error -which causes a memory leak, it will be very small. +which causes a memory leak, the leak will be very small. Functions which can fail (i.e. print an error message and stop) return a Status, -which is a bool, but GCC warns about not using the return value. +which is a bool, but GCC/clang warns about not using the return value. +Almost all of toc's types are defined in types.h. The fixed-width types U8/16/32/64 and I8/16/32/64 have been defined. data\_structures.c contains a dynamic array implementation which is very useful. -Many of the members of the types below are dynamic arrays. - ### Notes |