|
|
| Line 5: |
Line 5: |
|
| |
|
| = NaRef = | | = NaRef = |
|
| |
| = Memory allocation =
| |
| All core memory allocation takes place via wrappers in [https://gitorious.org/fg/simgear/blobs/next/simgear/nasal/misc.c#line8 misc.c]:
| |
|
| |
| <syntaxhighlight lang="C">
| |
| void naFree(void* m) { free(m); }
| |
| void* naAlloc(int n) { return malloc(n); }
| |
| void* naRealloc(void* b, int n) { return realloc(b, n); }
| |
| void naBZero(void* m, int n) { memset(m, 0, n); }
| |
| </syntaxhighlight>
| |
|
| |
|
| = Allocating Nasal types = | | = Allocating Nasal types = |