summaryrefslogtreecommitdiff
path: root/rtl-allocator.h (follow)
AgeCommit message (Collapse)Author
2012-07-16Resolve unresolved externals when loading object files.Chris Johns
Object files that depend on each other will cause an unresolved external. The change lets object files load with unresolved externals and will resolve them when the object file with the external is loaded. A common table of symbol strings and relocation records is maintained. The symbol string is shared by each object file that is unresolved. Each relocation record that references the symbol is held. The table is a series of small blocks that compact as symbols are resolved. The number of symbols left unresolved is typically small this design avoids fragmentation of the heap memory.
2012-05-28Rework the allocator.Chris Johns
The allocator now supports symbols, externals, objects and various memory attributes when allocating. Provide a clear on allocation, is calloc. Make the strings in the object files object allocations and not indirect pointers. This is due to symbols and symbol strings being allocated in a single blocks per object file. Only externals will be indirect allocations. Some trace output changes adding 'rtl'.
2012-05-13Support indirect pointers for strings in the object file.Chris Johns
Add indirect pointers and use it for the file names parts which are part of the object module.
2012-05-08Add RTL allocator.Chris Johns
Add a custom allocator that can be hooked. The default heap allocator in this code does nothing more than wrap the libc heap allocator. Fix up the RTL initialise to better handle the locking and initialisation of internal structures.