Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some devices are failing CoreStartup with M64ERR_NO_MEMORY #467

Closed
fzurita opened this issue Nov 3, 2017 · 5 comments
Closed

Some devices are failing CoreStartup with M64ERR_NO_MEMORY #467

fzurita opened this issue Nov 3, 2017 · 5 comments

Comments

@fzurita
Copy link
Member

fzurita commented Nov 3, 2017

@bsmiles32 It seems like recent change is breaking many Android devices. Specifically this commit:

143cfa7#diff-fa9734f1550e974c80b15a8a6fed3ad7

A lot of devices are failing with M64ERR_NO_MEMORY on CoreStartup.

Is there any way to fallback to the old behavior if we are unable to allocate that much RAM?

So far this error has been limited to Samsung devices.

@bsmiles32
Copy link
Member

I think the problem here is that either for their device overcommitting is disabled or that their malloc implementation doesn't use an anonymous mmap internally. I think replacing the malloc/free with mmap/munmap (VirtualAlloc/VirtualFree for Win32) will fix this. Will do a PR when I get back home.

@fzurita
Copy link
Member Author

fzurita commented Nov 3, 2017

I replaced malloc and free with

 g_mem_base = mmap(NULL,0x20000000,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0);
munmap(g_mem_base,0x20000000);

It seems to run, but I haven't gotten results from devices with the issue yet. I will report back when I do.

@fzurita
Copy link
Member Author

fzurita commented Nov 4, 2017

The above didn't work for them, it instead crashed when accessing the memory. I'm having them try your pull request next.

@bsmiles32
Copy link
Member

@fzurita Can you try this : #474

@fzurita
Copy link
Member Author

fzurita commented Nov 8, 2017

Ok, I'll let you know when I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants