Fixes #1791: Port Lua Bin Allocator to next:
* Bin Allocator * Lua memory allocaton fixes * Simulator memory leak fixes
This commit is contained in:
@@ -323,6 +323,11 @@ void *main_thread(void *)
|
||||
perMain();
|
||||
sleep(10/*ms*/);
|
||||
}
|
||||
|
||||
#if defined(LUA)
|
||||
luaClose();
|
||||
#endif
|
||||
|
||||
#ifdef SIMU_EXCEPTIONS
|
||||
}
|
||||
catch (...) {
|
||||
@@ -396,6 +401,14 @@ void StopEepromThread()
|
||||
sem_post(eeprom_write_sem);
|
||||
pthread_join(eeprom_thread_pid, NULL);
|
||||
#endif
|
||||
#ifdef __APPLE__
|
||||
//TODO free semaphore eeprom_write_sem
|
||||
#else
|
||||
sem_destroy(eeprom_write_sem);
|
||||
free(eeprom_write_sem);
|
||||
#endif
|
||||
|
||||
if (fp) fclose(fp);
|
||||
}
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
@@ -546,6 +559,13 @@ FRESULT f_opendir (DIR * rep, const TCHAR * name)
|
||||
return FR_OK;
|
||||
}
|
||||
|
||||
FRESULT f_closedir (DIR * rep)
|
||||
{
|
||||
TRACE("f_closedir(%p)", rep);
|
||||
simu::closedir((simu::DIR *)rep->fs);
|
||||
return FR_OK;
|
||||
}
|
||||
|
||||
FRESULT f_readdir (DIR * rep, FILINFO * fil)
|
||||
{
|
||||
if (!rep->fs) return FR_NO_FILE;
|
||||
|
||||
Reference in New Issue
Block a user