20,741
edits
| Line 230: | Line 230: | ||
== The pool manager == | == The pool manager == | ||
All high level type allocators (naNewString, naNewVector, naNewHash etc) make use of the naNew() call introduced earlier. | All high level type allocators (naNewString, naNewVector, naNewHash etc) make use of the naNew() call introduced earlier. | ||
naNew() doesn't directly allocate new memory from the heap, but instead use the naGC_get() helper which manages | naNew() doesn't directly allocate new memory from the heap, but instead use the naGC_get() helper which manages memory from the global pools. | ||
The interesting part is the naGC_get() function which isn't directly mapped to naAlloc() or malloc(), but instead manages the Nasal memory pools. | The interesting part is the naGC_get() function which isn't directly mapped to naAlloc() or malloc(), but instead manages the Nasal memory pools. | ||