...
Code Block | ||||
---|---|---|---|---|
| ||||
EdmiError edmiRemoteMemoryLogging (SdaiServerContext serverContextId, SdaiOptions options, SdaiString password,superuserPassword, SdaiInteger appserverPortNumber, SdaiString localFileName, SdaiSelect extensionArg1, SdaiSelect extensionArg2, SdaiSelect extensionArg3, SdaiInvocationId *edmiInvocationId); |
This function is intended for analysis of memory usage - expert usage only virtual memory allocation and deallocation in the actual running EDMcore, for the purpose of detecting memory leaks.
Running EDMcore can be an EDMserver, EDMappServer or EDMstandAlone (EDMtoolkit).
Only the user 'superuser' or users that provides the 'superuserPassword' argument is authorised to perform this function.
This function is intended for expert-use only and is currently available in debug version of EDMcore.
Arguments
...
Type | Name | Comment | |||
SdaiServerContext | serverContextId | Context identification, from edmiDefineServerContext | |||
SdaiOptions | options | See description of available options below. | |||
SdaiString | password | /* optional argument */ | SdaiString | localFileNamesuperuserPassword | Optional argument.The password of 'superuser' when another user than 'superuser' want to perform memory logging in an EDMserver or EDMappServer |
SdaiInteger | appserverPortNumber | Optional argument. Only effective with the option APPSERVER_OPERATION. Specify the port number of the actual EDMappServer to perform logging on. With the option APPSERVER_OPERATION and no 'appserverPortNumber' argument specified, the actual server context's connected EDMappserver will be the actual EDMcore to perform the memory logging operation on. | |||
SdaiString | localFileName | The file name to receive the result of the memory logging | |||
SdaiSelect | extensionArg1 | For future extension | |||
SdaiSelect | extensionArg2 | For future extension | |||
SdaiSelect | extensionArg3 | For future extension | |||
SdaiInvocationId | edmiInvocationId | Currently not used. |
...
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Options
...
1 | OptionOptions | Comment | |
2 | APPSERVER_OPERATION | Memory logging function on an EDMappserver | |
3 | SERVER_OPERATION | Memory logging operation on an EDMserver | |
4 | CLOSE_MEMORY_LOGGING | Close current active memory logging. | 3The result will be written to the "CLOSED_MEMORY_LOGGING_RESULT" file. The current logging result will be cleared, |
5 | START_MEMORY_LOGGING | Start memory logging | |
46 | STOP_MEMORY_LOGGING | 5Stop memory logging. Memory logging may be restarted (continued) with the START_MEMORY_LOGGING option | |
7 | RESTART_MEMORY_LOGGING | 6Valid option together with the CLOSE_MEMORY_LOGGING option, i.e,., as performing a CLOSE_MEMORY_LOGGING followed by a START_MEMORY_LOGGING operation | |
8 | GET_CURRENT_MEMORY_LOGGING_RESULT | 7Read the current memory logging result, i.e., the result collected since the last CLOSE_MEMORY_LOGGIN operation | |
9 | GET_CLOSED_MEMORY_LOGGING_RESULT | Read the "CLOSED_MEMORY_LOGGING_RESULT" file. |
Example
...
language | cpp |
---|
...
PUBLIC EDMLONG C_RemoteMemoryLeakCatcher(tMenu *pMenu)
{
tCmndDescr *pCommand;
tSubMenu *pSubm;
EDMLONG rstat = OK;
SdaiServerContext serverContextId;
char *fileName,*tempFileName = NULL;
pCommand = pMenu->pCommand;
pSubm = pCommand->pMenu;
if (rstat = edmiGetServerContextId(*pSubm[0].pParVal,&serverContextId)) goto err;
fileName = *pSubm[2].pParVal;
if ((*fileName == '\0') && ((remoteMemoryLeakCatcherOptionsValue & GET_CURRENT_MEMORY_LOGGING_RESULT) || (remoteMemoryLeakCatcherOptionsValue & GET_CLOSED_MEMORY_LOGGING_RESULT))) {
tempFileName = fileName = getEdmsTempFileName();
}
if (rstat = edmiRemoteMemoryLogging(serverContextId,remoteMemoryLeakCatcherOptionsValue,*pSubm[1].pParVal,fileName,NULL,NULL,NULL,NULL)) goto err;
if (tempFileName != NULL) {
(void) displayFile(tempFileName);
}
err:
return(rstat);
}
...
See also
Filter by label (Content by label) | ||||||
---|---|---|---|---|---|---|
|
...