[MUD-Dev] More module ideas

Mark Gritter mark at erdos.Stanford.EDU
Fri Nov 13 19:41:47 CET 1998


I've been trying to think of some more examples of modules (particularly 
those I'd find interesting to write, of course.)

Memory management:
    A module which performs dynamic allocation; client modules
  may perform their own allocation from "chunks" granted by the memory
  manager, or depend on it for all requests.
      -- Enforce per-module or per-process memory limits if desired.
      -- Memory leak detection via a "debugging" version of the module.
      -- Usage statistics
    A simple version of this would just use malloc/free.  I don't think
  its feasible to require all modules to use the memory manager (particularly
  if existing code gets converted into a DevMUD module), this might be
  a good goal.
    The memory management module could also be the location of signal handlers
  (is there something corresponding in Windows?) for memory faults.

Remote Procedure Call:
    The RPC module would make use of the socket module.  Its responsiblity
  would be to provide argument marshalling and demarshalling.  Stub functions
  might still be needed in the client modules, but I'm picturing something
  like this (possibly machine-generated.)

void my_rpc_call(HostID host, int arg1, int arg2, char *arg3) {
  rpc_send(host, "my_rpc_call", "(i:hostID,i,i,*b:string)v",
	   &host);  /* Hmmm... not portable, I think.  Gonna have to
                       support varargs, or require some packaging here. */
}

    The module would take care of sequence numbers, timeouts, etc.  There's
  obviously a lost more to be designed, obviously, and I'm certainly not
  suggesting we implement RPC right away.

Mark Gritter
mark at erdos.stanford.edu




More information about the mud-dev-archive mailing list