You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Cetin Sert, pdfium
On the first issue, you wrote "munmap sometimes (...) fails to call
free". I'm not sure how PDFium developers can help here. If PDFium
calls munmap(), and the munmap() implementation does not fulfill its
end of the contract, that's their problem to fix, right?
suggests a potential patch for WASM builds as Windows (like emscripten / em++) also cannot resize the allocation run (=? perform partial munmap) and simply frees whole pages first before re-allocating instead?
Lei Zhang
unread,
Jun 22, 2021, 12:41:07 PM6/22/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pdfium
I have tried this as described here: https://github.com/emscripten-core/emscripten/issues/14459#issuecomment-866066268 (only replace the the body of TrimMappingInternal from _posix.h with that of _win.h). It seems to help in the most basic cases but it does hang when rendering pages. Is there any place else I should look at / replace?
Cetin Sert
unread,
Jun 22, 2021, 3:01:32 PM6/22/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
> I don't think that will work. The main reason is that the hint argument which is the first argument to SystemAllocPages is ignored under emscripten. As I said, I think you are going to want a more specific, higher level, solution that avoids SystemAllocPages completely and uses something like posix_memalign instead. Hopefully this can be done upstream: https://groups.google.com/g/pdfium/c/cDkppTy9mEc.
Cetin Sert
unread,
Jun 22, 2021, 3:09:00 PM6/22/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message