Doesn't really 'free', so called 'reset' instead.

This commit is contained in:
Sacha 2013-11-12 02:13:11 +10:00
parent 662ad32d4f
commit d50b01a778
3 changed files with 4 additions and 3 deletions

View File

@ -636,7 +636,7 @@ public:
void FreeCodeSpace()
{
#ifdef __SYMBIAN32__
FreeExecutableMemory(region);
ResetExecutableMemory(region);
#else
FreeMemoryPages(region, region_size);
#endif

View File

@ -49,8 +49,9 @@
static RChunk* g_code_chunk = NULL;
static RHeap* g_code_heap = NULL;
static u8* g_next_ptr = NULL;
static u8* g_orig_ptr = NULL;
void FreeExecutableMemory(void* ptr)
void ResetExecutableMemory(void* ptr)
{
// Just reset the ptr to the base
g_next_ptr = g_orig_ptr;

View File

@ -31,7 +31,7 @@ void FreeAlignedMemory(void* ptr);
void WriteProtectMemory(void* ptr, size_t size, bool executable = false);
void UnWriteProtectMemory(void* ptr, size_t size, bool allowExecute = false);
#ifdef __SYMBIAN32__
void FreeExecutableMemory(void* ptr);
void ResetExecutableMemory(void* ptr);
#endif
inline int GetPageSize() { return 4096; }