From: Fletcher T. Penney Date: Wed, 28 Mar 2018 01:17:42 +0000 (-0400) Subject: UPDATED: Update quick start guide X-Git-Tag: 6.3.1^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=15671bde5648fc2001e2b391b476b33f8021a62b;p=multimarkdown UPDATED: Update quick start guide --- diff --git a/QuickStart/QuickStart.txt b/QuickStart/QuickStart.txt index 6e4e22a..f04f470 100644 --- a/QuickStart/QuickStart.txt +++ b/QuickStart/QuickStart.txt @@ -491,6 +491,66 @@ This can be useful when a particular file can either be a standalone document, or a chapter inside a larger document. +# Developer Notes # + +If you're using MMD as a library in another application, there are a few +things to be aware of. + + +## Object Pools ## + +To improve performance, MMD has the option to allocate the memory for the +tokens used in parsing in large chunks ("object pools"). Allocating a single +large chunk of memory is more efficient than allocating many smaller chunks. +However, this does complicate memory management. + +By default `token.h` defines `kUseObjectPool` which enables this performance +improvement. This does require more caution with the way that memory is +managed. (See `main.c` for an example of how the object pool is allocated and +drained.) I recommend disabling object pools unless you really understand C +memory management, and understand MultiMarkdown's program flow. Failure to +properly manage the object pool can lead to massive memory leaks, freeing +memory before that is still in use, or other potential problems. + + +## HTML Boolean Attributes ## + +Most HTML attributes are of the key-value type (e.g. `key="value"`). But some +less frequently used attributes are boolean attributes (e.g. `