Running the External Pathway DLL in a Separate Process

By default, GoldSim loads DLLs used by External elements into the GoldSim process space. GoldSim and the all external DLLs therefore share the application’s address space, which is usually limited to 2 GB on Windows operating systems. In some case, a single DLL itself may have large memory requirements (e.g., if it loaded large sets of data from files or databases), or it could statically or dynamically allocate large blocks of memory. If the combined memory requirements of GoldSim (the executable), the GoldSim model (including all model properties, buffers and result values) and all DLLs exceeds 2 GB, GoldSim will be unable to carry out the simulation. The user will be forced to preserve memory by saving fewer histories or timesteps, or by turning off saving of results for certain elements.

To circumvent this limitation, GoldSim provides a feature that allows external DLLs to be executed outside of the GoldSim process space. If Run in separate process is checked, GoldSim does not load the DLL into its own process space. Instead, it launches a separate small DLL server with its own private process space. The DLL server works like a middleman who dispatches information between GoldSim and the external DLL. Each DLL that runs in a separate process has its own DLL server. Therefore each DLL has access to a private 2 GB process space, which is not shared with any other DLL or application.

   Note: 64-bit DLLs must be run in a separate process.

Related Topics…