interface
| 141 | |
| 142 | // interface |
| 143 | int asSetGlobalMemoryFunctions(asALLOCFUNC_t allocFunc, asFREEFUNC_t freeFunc) |
| 144 | { |
| 145 | // Clean-up thread local memory before changing the allocation routines to avoid |
| 146 | // potential problem with trying to free memory using a different allocation |
| 147 | // routine than used when allocating it. |
| 148 | asThreadCleanup(); |
| 149 | |
| 150 | userAlloc = allocFunc; |
| 151 | userFree = freeFunc; |
| 152 | |
| 153 | return 0; |
| 154 | } |
| 155 | |
| 156 | // interface |
| 157 | int asResetGlobalMemoryFunctions() |