void AvmDebugMsg(const char* p, bool debugBreak) { #ifdef _DEBUG VMPI_debugLog(p); if(debugBreak) VMPI_debugBreak(); #else (void)p; (void)debugBreak; #endif }
bool AVMPI_commitMemory(void* address, size_t size) { bool result = false; SymbianHeap* heap = SymbianHeap::FindHeap((TUint)address, symbianHeapListRoot); if(heap) { result = heap->Commit((TUint)address, size); // FIXME https://bugzilla.mozilla.org/show_bug.cgi?id=571407 // This needs to be investigated, rather than a simple band-aid applied. // TEMPORARY FIX: MMgc should zero initialize the memory, but it does not seem to do it in all cases. if(result) { VMPI_memset(address, 0, size); } else { VMPI_debugLog("Failed to allocate normal memory.\n"); } } return result; }
uint32_t querySignalMask() { #if (defined(AVMPLUS_MAC) || defined(linux)) && defined(DEBUG) // will save just the 32 signals to avoid exposing sigset_t in ExceptionFrame sigset_t set; uint32_t mask = 0; if (sigprocmask(0, NULL, &set) == -1) { VMPI_debugLog("signal mask query failed\n"); VMPI_debugBreak(); } for (int i = 0; i< 32; i++) { if (sigismember(&set, i)) mask |= (1 << i); } return mask; #else // will use the setjmp/longjmp calls that do save and restore // signal masks, so no need to verify that the signal mask // hasn't changed. return 0; #endif }
void GCDebugMsg(const char* p, bool debugBreak) { VMPI_debugLog(p); if(debugBreak) VMPI_debugBreak(); }