# pFreePool

Syntax: | Copy
    #ilASM{
        [32]
            mov eax,<raw memory address>
            mov ecx,<size that pGetPool said>
            mov edx,<era>
        [64]
            mov rax,<raw memory address>
            mov rcx,<size that pGetPool said>
            mov rdx,<era>
        []
            call :%pFreePool
          }
Description: | Internal routine to release raw memory, counterpart to pGetPool, intended for use by the likes of pDealloc, pStack, opApnd, and pFree. The latter (the hll free() function) is in fact just a slim wrapper that retrieves the actual size, as saved by pAlloc, and as left in e/rdx by pGetPool. The era, or effective return address, is the value which is translated to a line number when reporting a fatal error. Obviously it is much better to report errors on a line such as `s[i] = x` in preference to a `call :%pFreePool` in pDealloc etc, and likewise any such errors should only occur after a rogue poke, incorrect memory allocation size, or similar.
On return: | (no specific result) [32] trashes eax/ecx/edx/esi/edi [64] trashes rax/rcx/rdx/rsi/rdi/r8/r9/r10/r11
Defined in: | builtins\VM\pHeap.e