If the function succeeds, the return value is non-zero and the
memory usage value will be updated. If the server handle
is invalid, or the server cannot be locked, the return value is zero. Call the
FtpGetServerError function to determine the cause of the failure.
This function returns the amount of memory allocated by the server
and all active client sessions. It enumerates all of memory
allocations made by the server process and client session threads and
returns the total number of bytes allocated for the server process. This
value reflects the amount of memory explicitly allocated by this
library and does not reflect the total working set size of the
process, or memory allocated by any other libraries. To determine the
working set size for the process, refer to the Win32
GetProcessWorkingSetSize and GetProcessMemoryInfo functions.
This function forces the server into a locked state, and all client
sessions will block until the function returns. Because this function
enumerates all heaps allocated for the server process, it can be an
expensive operation, particularly when there are a large number of
active clients connected to the server. Frequent use of this function
can significantly degrade the performance of the server. It is
primarily intended for use as a debugging tool to determine if
memory usage is the result of an increase in active client
sessions. If the value returned by the function remains reasonably
constant, but the amount of memory allocated for the process continues
to grow, it could indicate a memory leak in some other area of the
application.