Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 23 of file malloc.c.
Referenced by PsaiFree(), PsaiMalloc(), and PsaiRealloc().
{ PVOID pBuf = NULL; if(Size == 0 && Ptr == NULL) { return NULL; } if(Heap == NULL) { Heap = NtCurrentPeb()->ProcessHeap; } if(Size > 0) { if(Ptr == NULL) /* malloc */ pBuf = RtlAllocateHeap(Heap, 0, Size); else /* realloc */ pBuf = RtlReAllocateHeap(Heap, 0, Ptr, Size); } else /* free */ RtlFreeHeap(Heap, 0, Ptr); return pBuf; }