Memalloc

void * Memalloc(ulong size,int flags);

Allocates memory in the context of OllyDbg. Requests are redirected to GlobalAlloc(). Use it to allocate larger chunks of memory. Call Memfree() to free this memory.


Parameters:

size
(in) Size of the memory to allocate, bytes
flags
(in) Allocation options, a combination of zero or more of the following flags:
REPORT - report memory allocation errors. Incompatible with SILENT
SILENT - don't report memory allocation errors
ZEROINIT - initialize allocated memory to 0


Return values:

On success, returns pointer to the allocated memory. Otherwise, returns NULL


Hidden feature:

OllyDbg implements optional detection of memory leaks and buffer overflows. To turn it on, search for the following line in the main initialization file (usually ollydbg.ini):

  [Settings]
  Monitor internal memory allocation=0

and change the value to 1.


See also:
Memdouble(), Memfree(), Mempurge(), Virtalloc(), Virtfree()