On Thu, May 20, 2010 at 9:01 AM, Koskinen Janne
<[email protected]>wrote:

> >The app runs on the emulator if WebView does NOT
> >attempt to load a url or set html directly using the url and
> >html webview attributes respectively.  If html is loaded or a
> >url is provided the app crashes.
>
> WINSCW Emulator environment with Webkit is asking for trouble.
> I think you just ran out of memory within the emulator instead of this
> being issue in fastmalloc. Did you note the size of the allocation you were
> doing and that it was the alloc that failed with Kern-Exec 3 or User 0
> (CRASH macro) ? If the size was huge then it could be alignment issue.
>

fastMalloc called with size 4259840 (4160KB or 4MB)
Failed with CRASH 0, so the CRASH macro was used, here is the code for
fastMalloc

void* fastMalloc(size_t n)
{
    ASSERT(!isForbidden());

#if ENABLE(FAST_MALLOC_MATCH_VALIDATION)
    TryMallocReturnValue returnValue = tryFastMalloc(n);
    void* result;
    returnValue.getValue(result);
#else
    void* result = malloc(n);
#endif

    if (!result) {
#if PLATFORM(BREWMP)
        // The behavior of malloc(0) is implementation defined.
        // To make sure that fastMalloc never returns 0, retry with
fastMalloc(1).
        if (!n)
            return fastMalloc(1);
#endif
        CRASH();
    }

    return result;
}



>
> Did you increase the emulator heap size from epoc.ini?
>

Yes I tried this, it didn't help.  The default is 64MB, I changed it to
"MegabytesOfFreeMemory 1024"


> Set the available RAM to same as your device has after boot. N97 that is
> roughly 50MB.
>

By this do you mean modifying epoc.ini to a value of 50?


>
> Did you use VMMap to check how much you can allocate for the emulator?
> allocating 50MB of continuous memory can be difficult even with 4GB config.
> Loading emulator binaries with their debug data can cause situation where
> there isn't 50MB continuous block available in Windows. Killing all other
> processes esp. web browser before running the emulator helps.
>

I can use VMMap to look at the memory epoc.exe uses and how much of it is
actually in RAM (size of the working set), but I don't know how I can find
out how much memory is available for epoc.exe.


>
> And last did you set proper heapsize for your application?
> Say 100MB for application and with 50MB device limit you'd see 'real OOMs'.
>
> If you can run this on the device I wouldn't worry about it too much.
>
> -Janne




-- 
Regards
Jack
_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback

Reply via email to