20,741
edits
m (→Memory blocks) |
|||
| Line 140: | Line 140: | ||
== The naPool structure == | == The naPool structure == | ||
The layout of the | The structure keeping all pool-related information is named "naPool", the layout of the naPool structure can be seen in data.h, line 172: https://gitorious.org/fg/simgear/blobs/next/simgear/nasal/data.h#line172 | ||
<syntaxhighlight lang="C"> | <syntaxhighlight lang="C"> | ||
struct naPool { | struct naPool { | ||
int type; | int type; // one of T_STR, T_VEC, T_HASH etc | ||
int elemsz; | int elemsz; // size of each element - determiend via naTypeSize(T_*) | ||
struct Block* blocks; | struct Block* blocks; | ||
void** free0; // pointer to the alloced buffer | void** free0; // pointer to the alloced buffer | ||