20,741
edits
m (→naNew()) |
|||
| Line 46: | Line 46: | ||
= naNew() = | = naNew() = | ||
As can be seen, the key allocator function is [https://gitorious.org/fg/simgear/blobs/next/simgear/nasal/misc.c#line66 naNew()]. naNew() is really just a fancy malloc() replacement, i.e. it's just getting passed the size of the requested memory region. | As can be seen, the key allocator function is [https://gitorious.org/fg/simgear/blobs/next/simgear/nasal/misc.c#line66 naNew()]. naNew() is really just a fancy malloc() replacement, i.e. it's just getting passed the context, and the nasal type (which is mapped to the size of the requested memory region using naTypeSize()). | ||
The naNew() function is also implemented in misc.c, see [https://gitorious.org/fg/simgear/blobs/next/simgear/nasal/misc.c#line122 line 66]: | The naNew() function is also implemented in misc.c, see [https://gitorious.org/fg/simgear/blobs/next/simgear/nasal/misc.c#line122 line 66]: | ||