In latest emscripten master (1.22) there is an option to customize that
using Module.memoryInitializerPrefixURL.

- Alon



On Tue, Sep 2, 2014 at 1:12 AM, awt <[email protected]> wrote:

> Hi,
>
> I am currently at 1.16 and trying to use the --memory-init-file 1 option
> because my JS file is too huge. I notice that the .mem file that is
> generated is always placed at the root directory. I believe this is due to
> the following piece of code that loads that file just based on the file
> name:
>
> if (memoryInitializer) {
>   if (ENVIRONMENT_IS_NODE || ENVIRONMENT_IS_SHELL) {
>     var data = Module['readBinary'](memoryInitializer);
>     HEAPU8.set(data, STATIC_BASE);
>   } else {
>     addRunDependency('memory initializer');
>     Browser.asyncLoad(*memoryInitializer*, function(data) {
>       HEAPU8.set(data, STATIC_BASE);
>       removeRunDependency('memory initializer');
>     }, function(data) {
>       throw 'could not load memory initializer ' + memoryInitializer;
>     });
>   }
> }
>
> Is there a way to tell my generated Javascript file to load the .mem file
> from a specific location? I would like to place my .mem file in the same
> location as my generated Javascript. Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to