Android && avoid mem size trouble

This commit is contained in:
Vitor Santos Costa 2016-06-17 16:42:26 +01:00
parent 3c28902ec5
commit 647ebac5e4
5 changed files with 8 additions and 31 deletions

View File

@ -11,6 +11,7 @@ bool sockets_io =false
bool within_print_message =false bool within_print_message =false
// //
// Used by the prompts to check if they are after a newline, and then a // Used by the prompts to check if they are after a newline, and then a
// prompt should be output, or if we are in the middle of a line. // prompt should be output, or if we are in the middle of a line.
// //
@ -215,8 +216,8 @@ wchar_t* CommentsBuff void
size_t CommentsBuffPos void size_t CommentsBuffPos void
size_t CommentsBuffLim void size_t CommentsBuffLim void
sigjmp_buf RestartEnv void sigjmp_buf RestartEnv void
char FileNameBuf[YAP_FILENAME_MAX] void char FileNameBuf[YAP_FILENAME_MAX+1] void
char FileNameBuf2[YAP_FILENAME_MAX] void char FileNameBuf2[YAP_FILENAME_MAX+1] void
// Prolog State // Prolog State
UInt BreakLevel =0 UInt BreakLevel =0
@ -294,14 +295,6 @@ UInt ImportDBRefHashTableSize =0
UInt ImportDBRefHashTableNum =0 UInt ImportDBRefHashTableNum =0
yamop *ImportFAILCODE =NULL yamop *ImportFAILCODE =NULL
#if __ANDROID__
// current virtual directory.
struct AAssetManager* assetManager =GLOBAL_assetManager
char* InAssetDir =NULL
#endif
// exo indexing // exo indexing
UInt ibnds[256] void UInt ibnds[256] void
@ -316,6 +309,7 @@ struct pred_entry* SearchPreds void
// Slots // Slots
yhandle_t CurSlot =0 yhandle_t CurSlot =0
yhandle_t FrozenHandles =0
yhandle_t NSlots =0 yhandle_t NSlots =0
CELL* SlotBase =InitHandles(wid) CELL* SlotBase =InitHandles(wid)

View File

@ -453,13 +453,6 @@
#define REMOTE_ImportDBRefHashTableNum(wid) REMOTE(wid)->ImportDBRefHashTableNum_ #define REMOTE_ImportDBRefHashTableNum(wid) REMOTE(wid)->ImportDBRefHashTableNum_
#define LOCAL_ImportFAILCODE LOCAL->ImportFAILCODE_ #define LOCAL_ImportFAILCODE LOCAL->ImportFAILCODE_
#define REMOTE_ImportFAILCODE(wid) REMOTE(wid)->ImportFAILCODE_ #define REMOTE_ImportFAILCODE(wid) REMOTE(wid)->ImportFAILCODE_
#if __ANDROID__
#define LOCAL_assetManager LOCAL->assetManager_
#define REMOTE_assetManager(wid) REMOTE(wid)->assetManager_
#define LOCAL_InAssetDir LOCAL->InAssetDir_
#define REMOTE_InAssetDir(wid) REMOTE(wid)->InAssetDir_
#endif
#define LOCAL_ibnds LOCAL->ibnds_ #define LOCAL_ibnds LOCAL->ibnds_
#define REMOTE_ibnds(wid) REMOTE(wid)->ibnds_ #define REMOTE_ibnds(wid) REMOTE(wid)->ibnds_
@ -479,6 +472,8 @@
#define LOCAL_CurSlot LOCAL->CurSlot_ #define LOCAL_CurSlot LOCAL->CurSlot_
#define REMOTE_CurSlot(wid) REMOTE(wid)->CurSlot_ #define REMOTE_CurSlot(wid) REMOTE(wid)->CurSlot_
#define LOCAL_FrozenHandles LOCAL->FrozenHandles_
#define REMOTE_FrozenHandles(wid) REMOTE(wid)->FrozenHandles_
#define LOCAL_NSlots LOCAL->NSlots_ #define LOCAL_NSlots LOCAL->NSlots_
#define REMOTE_NSlots(wid) REMOTE(wid)->NSlots_ #define REMOTE_NSlots(wid) REMOTE(wid)->NSlots_
#define LOCAL_SlotBase LOCAL->SlotBase_ #define LOCAL_SlotBase LOCAL->SlotBase_

View File

@ -255,11 +255,6 @@ const char* Error_Function_;
UInt ImportDBRefHashTableSize_; UInt ImportDBRefHashTableSize_;
UInt ImportDBRefHashTableNum_; UInt ImportDBRefHashTableNum_;
yamop *ImportFAILCODE_; yamop *ImportFAILCODE_;
#if __ANDROID__
// current virtual directory.
struct AAssetManager* assetManager_;
char* InAssetDir_;
#endif
// exo indexing // exo indexing
UInt ibnds_[256]; UInt ibnds_[256];
struct index_t* exo_it_; struct index_t* exo_it_;
@ -271,6 +266,7 @@ const char* Error_Function_;
struct pred_entry* SearchPreds_; struct pred_entry* SearchPreds_;
// Slots // Slots
yhandle_t CurSlot_; yhandle_t CurSlot_;
yhandle_t FrozenHandles_;
yhandle_t NSlots_; yhandle_t NSlots_;
CELL* SlotBase_; CELL* SlotBase_;
// Mutexes // Mutexes

View File

@ -255,11 +255,6 @@ static void InitWorker(int wid) {
REMOTE_ImportDBRefHashTableSize(wid) = 0; REMOTE_ImportDBRefHashTableSize(wid) = 0;
REMOTE_ImportDBRefHashTableNum(wid) = 0; REMOTE_ImportDBRefHashTableNum(wid) = 0;
REMOTE_ImportFAILCODE(wid) = NULL; REMOTE_ImportFAILCODE(wid) = NULL;
#if __ANDROID__
REMOTE_assetManager(wid) = GLOBAL_assetManager;
REMOTE_InAssetDir(wid) = NULL;
#endif
REMOTE_exo_it(wid) = NULL; REMOTE_exo_it(wid) = NULL;
@ -271,6 +266,7 @@ static void InitWorker(int wid) {
REMOTE_CurSlot(wid) = 0; REMOTE_CurSlot(wid) = 0;
REMOTE_FrozenHandles(wid) = 0;
REMOTE_NSlots(wid) = 0; REMOTE_NSlots(wid) = 0;
REMOTE_SlotBase(wid) = InitHandles(wid); REMOTE_SlotBase(wid) = InitHandles(wid);

View File

@ -255,13 +255,9 @@ static void RestoreWorker(int wid USES_REGS) {
#if __ANDROID__
#endif