ESM/FSM Overview

Version 4.06

Irv.Elshoff@deltares.nl
19 aug 04


Introduction

ESM and FSM are libraries for C and Fortran, respectively, that provide easy access to shared memory using a named "key" space.  ESM is an acronym for Easy Shared Memory. FSM is for Fortran Shared memory.  Programs using ESM/FSM can allocate space for variables and assign a character-string name to the space that can be used by another process to get the address of the variable. ESM/FSM variables can range from single characters, integers or reals to much larger data structures.

Both libraries use the notion of a "context" to group related variables.  By default, contexts are in placed in shared memory, that is, UNIX SVR4 shared memory, so that several processes on the same host can access the variables.  A flag can be given that uses "local" memory instead of shared memory.   This is useful when lightweight processes (also known as threads) are used.  Shared memory is not implemented on the Microsoft Windows platform.

FSM is based on the Deltares' FMM (Fortran Memory Management).  FMM was created around 1990 to provide dynamic memory management for Fortran-77.  FSM has the same API (with a few extensions) as FMM for backward compatibility.  FSM is built on top of ESM.  Since Fortran-95 provides native memory management, FSM is not recommended for use in new programs, unless shared memory is required.

ESM has been changed radically since the 3.0 version.  In particular, the API calls have changed, and threads are now properly supported.

Links