7875fe1acd
1) JIT compilation/optimization now occurs per-function, and only when functions are first used. We're now officially a whole-method JIT rather than an AOT compiler (albiet, still a simple JIT). This has two implications: Functions are now much better abstracted internally, and loading a plugin is now much less expensive. If a function contains calls to other functions, THOSE functions are only compiled when they're invoked as well. 2) I've removed debug mode. We always show full backtraces now, as there was a very cheap way to implement this which really cleaned up everything. This is great for a number of reasons -- there's less code, the JIT is better designed, we don't need to relocate debug tables, and best of all we no longer have to tell users to enable debug mode at their own expense. --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402459
37 lines
962 B
C++
37 lines
962 B
C++
#ifndef _INCLUDE_KNIGHT_KE_LUMP_ALLOCATOR_H_
|
|
#define _INCLUDE_KNIGHT_KE_LUMP_ALLOCATOR_H_
|
|
|
|
#include <KeLinking.h>
|
|
#include <KnightAllocator.h>
|
|
|
|
namespace Knight
|
|
{
|
|
/**
|
|
* @brief Creates a new lump allocator.
|
|
*
|
|
* The lump allocator is intended for cases where there are many allocations
|
|
* and none need to be freed. There is memory wastage, and the lump allocator
|
|
* is typically thrown away after use.
|
|
*
|
|
* @return New lump allocator.
|
|
*/
|
|
extern ke_allocator_t * KE_CreateLumpAllocator();
|
|
|
|
/**
|
|
* @brief Destroys a lump allocator, freeing all of its resources.
|
|
*
|
|
* @param lump Lump allocator.
|
|
*/
|
|
extern void KE_DestroyLumpAllocator(ke_allocator_t *alloc);
|
|
|
|
/**
|
|
* @brief Clears a lump allocator, so its memory can be re-used from
|
|
* the start.
|
|
*
|
|
* @param lump Lump allocator.
|
|
*/
|
|
extern void KE_ResetLumpAllocator(ke_allocator_t *alloc);
|
|
}
|
|
|
|
#endif //_INCLUDE_KNIGHT_KE_LUMP_ALLOCATOR_H_
|