cool idea of a friend of me – dariusz parys that has also an interesting feedback, i was looking between my floppy disks , is true hard to find an reader :), an i found not less or more then x86 asm code .
proc mem.realloc_heap heapptr, newsize, oldsize
push ecx edx
push 40h ;PAGE_EXECUTE_READWRITE
push 1000h ;MEM_COMMIT
push [heapptr] ;any address
.r: pop edx ecx
cmp eax, 8 ;ERROR_NOT_ENOUGH_MEMORY
cmp eax, 14 ;ERROR_OUTOFMEMORY
@@: pop eax
mov eax, ERR_UNKNOWN
try it out, interesting what will comes out.