Android &&VFS
This commit is contained in:
parent
647ebac5e4
commit
79d40f57b1
@ -38,12 +38,6 @@ UInt SizeOfOverflow =0
|
||||
UInt AGcThreshold =10000
|
||||
Agc_hook AGCHook =NULL
|
||||
|
||||
#if __ANDROID__
|
||||
// no need to perform initialization, it is done before we start the Prolog engine.
|
||||
struct AAssetManager* assetManager =NULL
|
||||
char* AssetsWD =NULL
|
||||
#endif
|
||||
|
||||
/* multi-thread support */
|
||||
#if THREADS
|
||||
/* number of threads and processes in system */
|
||||
@ -173,5 +167,6 @@ struct AliasDescS* FileAliases =Yap_InitStandardAliases()
|
||||
int NOfFileAliases void
|
||||
int SzOfFileAliases void
|
||||
|
||||
struct vfs* VFS =Yap_InitAssetManager()
|
||||
|
||||
END_GLOBAL_DATA
|
||||
|
@ -36,11 +36,6 @@
|
||||
|
||||
#define GLOBAL_AGcThreshold Yap_global->AGcThreshold_
|
||||
#define GLOBAL_AGCHook Yap_global->AGCHook_
|
||||
#if __ANDROID__
|
||||
|
||||
#define GLOBAL_assetManager Yap_global->assetManager_
|
||||
#define GLOBAL_AssetsWD Yap_global->AssetsWD_
|
||||
#endif
|
||||
|
||||
#if THREADS
|
||||
|
||||
@ -145,4 +140,5 @@
|
||||
#define GLOBAL_FileAliases Yap_global->FileAliases_
|
||||
#define GLOBAL_NOfFileAliases Yap_global->NOfFileAliases_
|
||||
#define GLOBAL_SzOfFileAliases Yap_global->SzOfFileAliases_
|
||||
#define GLOBAL_VFS Yap_global->VFS_
|
||||
|
||||
|
@ -30,11 +30,7 @@
|
||||
|
||||
|
||||
|
||||
#define Yap_HoleSize Yap_heap_regs->Yap_HoleSize_
|
||||
#define Yap_av Yap_heap_regs->Yap_av_
|
||||
#if USE_DL_MALLOC
|
||||
#define void Yap_heap_regs->void_
|
||||
#define Yap_NOfMemoryHoles Yap_heap_regs->Yap_NOfMemoryHoles_
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
#define DLMallocLock Yap_heap_regs->DLMallocLock_
|
||||
#endif
|
||||
@ -52,7 +48,7 @@
|
||||
#define HeapLim Yap_heap_regs->HeapLim_
|
||||
#define FreeBlocks Yap_heap_regs->FreeBlocks_
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
#define FreeBlocksLock Yap_heap_regs->FreeBlocksLock_
|
||||
#define fFreeBlocksLock Yap_heap_regs->FreeBlocksLock_
|
||||
#define HeapUsedLock Yap_heap_regs->HeapUsedLock_
|
||||
#define HeapTopLock Yap_heap_regs->HeapTopLock_
|
||||
#define HeapTopOwner Yap_heap_regs->HeapTopOwner_
|
||||
|
@ -36,11 +36,6 @@ EXTERNAL UInt GLOBAL_SizeOfOverflow;
|
||||
// amount of space recovered in all garbage collections
|
||||
EXTERNAL UInt GLOBAL_AGcThreshold;
|
||||
EXTERNAL Agc_hook GLOBAL_AGCHook;
|
||||
#if __ANDROID__
|
||||
// no need to perform initialization, it is done before we start the Prolog engine.
|
||||
EXTERNAL struct AAssetManager* GLOBAL_assetManager;
|
||||
EXTERNAL char* GLOBAL_AssetsWD;
|
||||
#endif
|
||||
/* multi-thread support */
|
||||
#if THREADS
|
||||
/* number of threads and processes in system */
|
||||
@ -145,4 +140,5 @@ EXTERNAL int GLOBAL_MaxPriority;
|
||||
EXTERNAL struct AliasDescS* GLOBAL_FileAliases;
|
||||
EXTERNAL int GLOBAL_NOfFileAliases;
|
||||
EXTERNAL int GLOBAL_SzOfFileAliases;
|
||||
EXTERNAL struct vfs* GLOBAL_VFS;
|
||||
|
||||
|
@ -31,9 +31,9 @@
|
||||
|
||||
/* memory management */
|
||||
EXTERNAL UInt Yap_HoleSize;
|
||||
EXTERNAL struct malloc_state *Yap_av;
|
||||
#if USE_DL_MALLOC
|
||||
EXTERNAL struct Yap_MemoryHoles[MAX_DLMALLOC_HOLES] void;
|
||||
EXTERNAL struct malloc_state *Yap_av;
|
||||
EXTERNAL struct memory_hole Yap_MemoryHoles[MAX_DLMALLOC_HOLES];
|
||||
EXTERNAL UInt Yap_NOfMemoryHoles;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
EXTERNAL lockvar DLMallocLock;
|
||||
|
@ -36,11 +36,6 @@ typedef struct global_data {
|
||||
// amount of space recovered in all garbage collections
|
||||
UInt AGcThreshold_;
|
||||
Agc_hook AGCHook_;
|
||||
#if __ANDROID__
|
||||
// no need to perform initialization, it is done before we start the Prolog engine.
|
||||
struct AAssetManager* assetManager_;
|
||||
char* AssetsWD_;
|
||||
#endif
|
||||
/* multi-thread support */
|
||||
#if THREADS
|
||||
/* number of threads and processes in system */
|
||||
@ -145,4 +140,5 @@ const char* RestoreFile_;
|
||||
struct AliasDescS* FileAliases_;
|
||||
int NOfFileAliases_;
|
||||
int SzOfFileAliases_;
|
||||
struct vfs* VFS_;
|
||||
} w_shared;
|
||||
|
@ -31,9 +31,9 @@
|
||||
|
||||
/* memory management */
|
||||
UInt Yap_HoleSize_;
|
||||
struct malloc_state *Yap_av_;
|
||||
#if USE_DL_MALLOC
|
||||
struct Yap_MemoryHoles[MAX_DLMALLOC_HOLES] void_;
|
||||
struct malloc_state *Yap_av_;
|
||||
struct memory_hole Yap_MemoryHoles[MAX_DLMALLOC_HOLES]_;
|
||||
UInt Yap_NOfMemoryHoles_;
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
lockvar DLMallocLock_;
|
||||
|
@ -36,11 +36,6 @@ static void InitGlobal(void) {
|
||||
|
||||
GLOBAL_AGcThreshold = 10000;
|
||||
GLOBAL_AGCHook = NULL;
|
||||
#if __ANDROID__
|
||||
|
||||
GLOBAL_assetManager = NULL;
|
||||
GLOBAL_AssetsWD = NULL;
|
||||
#endif
|
||||
|
||||
#if THREADS
|
||||
|
||||
@ -145,4 +140,5 @@ static void InitGlobal(void) {
|
||||
GLOBAL_FileAliases = Yap_InitStandardAliases();
|
||||
|
||||
|
||||
GLOBAL_VFS = Yap_InitAssetManager();
|
||||
}
|
||||
|
@ -27,14 +27,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if USE_DL_MALLOC
|
||||
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
INIT_LOCK(DLMallocLock);
|
||||
#endif
|
||||
|
@ -27,14 +27,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if USE_DL_MALLOC
|
||||
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
REINIT_LOCK(DLMallocLock);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user