Hardcode

Matters relating to the PennMUSH server code itself, written in C, and commonly called "hardcode".

mush_malloc() and memcheck

Penn includes a basic memory allocation debugger, enabled by setting mem_check to yes in mush.cnf and rebooting. However, to take advantage of this, you have to use special functions to allocate and free memory.

Allocating and tracking memory

Penn includes a basic memory allocation debugger, enabled by setting mem_check to yes in mush.cnf and rebooting. However, to take advantage of this, you have to use special functions to allocate and free memory.

It also (As of 1.8.3p4) features a slab allocator meant for space-efficient allocation of small fixed-size objects.

Boolexps

A boolexp is the key part of a @lock: #1, sex:M*, canpass/1, etc. This page talks about their implementation and describes how to add a new type of key.

Hash tables

Hash tables are a (usually) fast lookup function for (string key, value) tuples. They are used for things like looking up softcode functions. They support lookup of exact key names, and iteration through all elements in a random order.

Makefile rules

This page describes some of the more useful Makefile rules for PennMUSH.

Working with attributes

This chapter contains information on working with attributes -- setting, getting, iterating over, etc.

Shared strings

Shared string trees, aka StrTrees or just string trees, allow you to cache frequently-repeated strings instead of having dozens or hundreds of copies of the same one. They are used for things like attribute and object names.

Prefix tables

Prefix tables, aka ptabs, are a (string key,value) lookup structure used to find the entry for a name that is the unique prefix of a key in the table. For example, they're used by @set for flag names so that you don't have to get the full name of the flag.

Data structures

The pages in this chapter describe the various data structures used in Penn. They include hash tables, shared strings, unique-prefix lookup tables, and more.

Optimizing PennMUSH

Penn isn't typically a performance hog, especially on modern computers. Even older ones from the mid-90's are more than powerful enough to run a decent-sized game on. The major constraints with those older computers is hard drive space and memory. This document has some hints for those times when performance is a factor, or for those who just like to tweak.

Syndicate content